Body: <p>I want to add a Activity Filter Option that filters the activity down to the "Assigned To".</p>
  
  <p>in the ActivityFilter.php i have added this line of code:</p>
  
  <pre><code>    $assigneeDefault = CRM_Core_Session::getLoggedInContactID();
      $this-&gt;add('text', 'assignee_contact_id', ts('Task Owner'), $assigneeDefault, FALSE, ['class' =&gt; 'crm-form-text']);
  </code></pre>
  
  <p>Then in the selector.tpl i added this:</p>
  
  <pre><code>   &lt;td class="crm-contact-form-block-activity_assignee_contact_id crm-inline-edit-field"&gt;
         &lt;label&gt;{ts}Task Owner{/ts}&lt;/label&gt;&lt;br /&gt; {$form.assignee_contact_id.html|crmAddClass:medium}
     &lt;/td&gt;
  </code></pre>
  
  <p>Unfortunately no luck to confirm:</p>
  
  <p>I want a filter that shows only the activities 'Assigned To' a certain contact.</p>
  
  <p>Thanks,</p>
  
  <p>Moe</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-19T14:25:41.813Z
Comments.Text: 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 https://docs.civicrm.org/dev/en/latest/extensions/). Or is this in an extension?
Comments.UserDisplayName: ErikH - CiviCooP
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-19T14:45:48.387Z
Comments.Text: @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?
Comments.UserDisplayName: Moe
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-20T04:04:18.280Z
Comments.Text: @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.
Comments.UserDisplayName: Joe McLaughlin
Tags: <contacts><activities>
Title: Add 'Activity Filter' Option
ThreadText: # Add 'Activity Filter' Option
  
  (Asked by: username_0 on 2019-10-29)
  
  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:
     
         {ts}Task Owner{/ts} {$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.
  Thanks,
  username_0
  
  **Tags:** contacts, activities
  
  > **Comments:**
  > **username_1**: 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 https://docs.civicrm.org/dev/en/latest/extensions/). Or is this in an extension?  
  > **username_0**: @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?  
  > **username_2**: @petednz - fuzion -  If memory serves, this should be doable with the Views module in Drupal, right? username_0, I agree that filtering by Assigned [to] should be in the Civi UI anyway.  
  
  ---
  
  ## 0 answers
  
  