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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • Show case activities in activity report
Pages: [1]

Author Topic: Show case activities in activity report  (Read 371 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Show case activities in activity report
September 02, 2014, 05:01:30 am
Checking out a test upgrade of a 4.4.6 site to 4.5.beta8, I found that activity report instances not specifying activity type, which had shown case activities in 4.4 and previously, were not doing so in 4.5.beta8 . This appears to be due to this addition in CRM/Report/Form/Activity.php, function where() :

              if ($fieldName == 'activity_type_id' && empty($this->_params['activity_type_id_value'])) {
                $actTypes = array_flip(CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'label', TRUE));
                $clause = "( {$this->_aliases['civicrm_activity']}.activity_type_id IN (".implode(',',$actTypes).") )";
              }

I can see an argument for that, given that the activity report template does not include case activity types in the Activity Type filter. However users often want to see case activities in reports so there needs to be a way to allow this.

In 4.4, it was possible to change an existing activity type through the UI to Component = "Contacts OR Cases". In 4.5.beta8, the new-style edit form for activity types does not allow changing the component of an existing activity type. (Cf. https://forum.civicrm.org/index.php?topic=30502.0)

It's possible to get case activity types in the activity report by customising CRM/Report/Form/Activity.php, changing the second parameter of CRM_Core_PseudoConstant::activityType() from FALSE to TRUE in __construct() and where(). But customising core files is discouraged and it would be good to have a way to achieve this without customisation, as was possible in 4.4 .

Cheers,

Dave

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • Show case activities in activity report

This forum was archived on 2017-11-26.