3

CiviCRM 4.6.9. Drupal 7.30

How can I change the default Activity dashlet to include activities other than scheduled activities? By default, it only shows scheduled activities

2

You would need to change the code. But there is another way to get the Activities on your dashboard. Go to Reports, select Contact Reports and then Activities. If you then set all filters as you wish and tick the 'Available for Dashboard' option, and save the report as "My Desired Activities" (or any other name :-)) you should have a new dashlet available for your dashboard with your settings for activities?

| improve this answer | |
  • Thanks, Erik. I know how to use Reports to do that. But I'd like to change the default one as it has filters and sorting functionality. Do you know where I need to change the code by any chance? Thanks! – George Zhao Nov 22 '15 at 22:42
  • Probably CRM/Dashlet/Page/Activity.php, but check! – ErikH - CiviCooP Nov 23 '15 at 9:43
0

I have found the file I need to modify. CRM/Activity/BAO/Activity.php

Change

if ($input['context'] != 'activity') { $commonClauses[] = "civicrm_activity.status_id = 1 ; }

to

if ($input['context'] != 'activity') { $commonClauses[] = " (civicrm_activity.status_id = 1 or civicrm_activity.status_id = 7 )"; }

| improve this answer | |
  • I would not change that, you are then changing a core BAO function and other stuff might do different things too. My recommendation would be to create an extension and create your own activity report in there (and you could copy and change the relevant BAO function in your extension). – ErikH - CiviCooP Nov 26 '15 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.