1

I want to add a Activity Filter Option that filters the activity down to the "Assigned To".

in the ActivityFilter.php i have added this line of code:

    $assigneeDefault = CRM_Core_Session::getLoggedInContactID();
    $this->add('text', 'assignee_contact_id', ts('Task Owner'), $assigneeDefault, FALSE, ['class' => 'crm-form-text']);

Then in the selector.tpl i added this:

   <td class="crm-contact-form-block-activity_assignee_contact_id crm-inline-edit-field">
       <label>{ts}Task Owner{/ts}</label><br /> {$form.assignee_contact_id.html|crmAddClass:medium}
   </td>

Unfortunately no luck to confirm:

I want a filter that shows only the activities 'Assigned To' a certain contact.

Thanks,

Moe

  • Do I assume correctly you have edited the core files with your change? You should not do that, you should write an extension to customize CiviCRM behaviour (check docs.civicrm.org/dev/en/latest/extensions). Or is this in an extension? – ErikH - CiviCooP Nov 19 '19 at 14:25
  • @ErikH-CiviCooP - I have actually created an extension not editing the core files but to make it easier i make it seem like i edited the core files? Any ideas on how to do this? I am not knowing the best way round it? – Moe Nov 19 '19 at 14:45
  • @petednz - fuzion - If memory serves, this should be doable with the Views module in Drupal, right? Moe, I agree that filtering by Assigned [to] should be in the Civi UI anyway. – Joe McLaughlin Nov 20 '19 at 4:04

Your Answer

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

Browse other questions tagged or ask your own question.