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}

Unfortunately no luck to confirm:

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



  • 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? Nov 19, 2019 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, 2019 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. Nov 20, 2019 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.