CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Job Title and Employer in CiviContribute report
Pages: [1]

Author Topic: Job Title and Employer in CiviContribute report  (Read 1926 times)

matthewpetty

  • Guest
Job Title and Employer in CiviContribute report
October 23, 2008, 09:32:10 am
Hello everyone -

what would be the best way to include the job title and employer of any donor in the standard CiviContribute report?

matthewpetty

  • Guest
Re: Job Title and Employer in CiviContribute report
October 23, 2008, 09:54:02 am
I have found a spot to hack this in. I am editing <civicrm_root>/CRM/Contribute/Form/Task/Export.php

Here is the original code:
Code: [Select]
// also add addresss fields
        $addressProperties    = array(
                                      'street_address'         => 1,
                                      'supplemental_address_1' => 1,
                                      'supplemental_address_2' => 1,
                                      'city'                   => 1,
                                      'postal_code'            => 1,
                                      'postal_code_suffix'     => 1,
                                      'state_province'         => 1,
                                      'country'                => 1,
                                      'geo_code_1'             => 1,
                                      'geo_code_2'             => 1,
                                      'email'                  => 1,
                                      'phone'                  => 1,
                                      'im'                     => 1,
                                      );

And I want to add job title and current employer to the report, so I tried this:
Code: [Select]
// also add addresss fields
        $addressProperties    = array(
                                      'street_address'         => 1,
                                      'supplemental_address_1' => 1,
                                      'supplemental_address_2' => 1,
                                      'city'                   => 1,
                                      'postal_code'            => 1,
                                      'postal_code_suffix'     => 1,
                                      'state_province'         => 1,
                                      'country'                => 1,
                                      'geo_code_1'             => 1,
                                      'geo_code_2'             => 1,
                                      'email'                  => 1,
                                      'phone'                  => 1,
                                      'im'                     => 1,
                                      'job_title'             => 1,
                                      'current_employer' => 1
                                      );

I'm not much of a coder... the job title now displays correctly in the report, but the employer does not. What should I change that code to?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Job Title and Employer in CiviContribute report
October 23, 2008, 10:09:09 am
I guess you will have to do more code hacking. So if you want to export specific fields, i would suggest writing Custom Search.

Kurund
Found this reply helpful? Support CiviCRM

matthewpetty

  • Guest
Re: Job Title and Employer in CiviContribute report
October 23, 2008, 11:58:08 am
There's got to be an easier way to add current employer to the civicontribute reports than writing an entire custom search...

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Job Title and Employer in CiviContribute report
October 23, 2008, 12:05:12 pm

instead of
  current_employer => 1

can u add
  organization_name => 1

for efficiency reasons, we cache the current employer name in that field for individuals. that might work

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

matthewpetty

  • Guest
Re: Job Title and Employer in CiviContribute report
October 24, 2008, 08:38:05 am
I made the change you suggested.

Now the export correctly replaces the column title as "Organization Name" instead of "organization_name", but there is no data in the column. Contacts which I know have a current employer do not list any data in the Organization Name column.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Job Title and Employer in CiviContribute report
October 24, 2008, 09:12:36 am

So seems like your best alternative in the short term is to write a custom search. Would be a good one to share with other folks also. Should not be too hard to do either :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Job Title and Employer in CiviContribute report
November 16, 2008, 01:51:15 pm
Hi Matthew - any progress with this - either via the hacking or the custom search?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Job Title and Employer in CiviContribute report

This forum was archived on 2017-11-26.