Answers.Body: <p>Here's a working example of &quot;My Activities&quot;
  Olly: you should just be able to change Assignee to Source for your use case (in Configure Relationship Contact)</p>
  <p>Code: git repo -&gt; last commit -&gt;</p>
  <pre><code>commit bb1f503bd67d1537a16b28022a4f2444883ef231
  Author: Rob Ellis &lt;&gt;
  Date:   Sun Oct 11 23:21:17 2020 +0000
  
      Changed views contact subtype default arg to return &quot;&lt;none&gt;&quot; for users without a subtype
  </code></pre>
  <p><a href="https://i.sstatic.net/enjgl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/enjgl.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.sstatic.net/eYry8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/eYry8.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.sstatic.net/FPlI7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FPlI7.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.sstatic.net/OsSW3.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OsSW3.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-11T14:34:07.617Z
Answers.LastActivityDate: 2020-12-11T14:45:03.407Z
Answers.LastEditDate: 2020-12-11T14:45:03.407Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>This is a known <a href="https://github.com/eileenmcnaughton/civicrm_entity/issues/202" rel="nofollow noreferrer">issue</a> which is locked in github repo. There is a <a href="https://github.com/eileenmcnaughton/civicrm_entity/pull/204" rel="nofollow noreferrer">work in progress to fix</a> the issue.</p>
  <p>You can try applying the below patch in your d8 install to see if it resolves your problem</p>
  <ul>
  <li><a href="https://patch-diff.githubusercontent.com/raw/eileenmcnaughton/civicrm_entity/pull/213.patch" rel="nofollow noreferrer">https://patch-diff.githubusercontent.com/raw/eileenmcnaughton/civicrm_entity/pull/213.patch</a></li>
  <li><a href="https://patch-diff.githubusercontent.com/raw/eileenmcnaughton/civicrm_entity/pull/204.patch" rel="nofollow noreferrer">https://patch-diff.githubusercontent.com/raw/eileenmcnaughton/civicrm_entity/pull/204.patch</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-24T14:14:16.877Z
Answers.Text: I'm having the same problem. I tried applying the two patches and this didn't help in my case. I'm using the 8.x-3.x branch directly from the github repo. Do you have any suggestions?
Answers.UserDisplayName: Ben
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-11T13:36:52.637Z
Answers.Text: I have this working on a site - will find/extract/post the yaml once I have some espresso.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-13T18:50:08.513Z
Answers.LastActivityDate: 2020-07-13T18:50:08.513Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>We have been working on Views, with Civi Entity, on Drupal 8.</p>
  <p>We are having an issue a list of Activities and filters.
  We only want to load Activities where the source contact is a particular Contextual filter (contact ID). But adding a Contextual Filter of 'CiviCRM Activity (CiviCRM Entity): Activity Source Contact' leads to an error.</p>
  <p>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'civicrm_activity.source_contact_id' in 'where clause': SELECT civicrm_activity.id AS id FROM {civicrm_activity} civicrm_activity LEFT JOIN {civicrm_value_volunteering__9} civicrm_value_volunteering__9 ON civicrm_activity.id = civicrm_value_volunteering__9.entity_id WHERE (((civicrm_activity.activity_type_id = :civicrm_activity_activity_type_id)) AND ((civicrm_activity.source_contact_id = :civicrm_activity_source_contact_id))) AND ((civicrm_activity.is_deleted = :db_condition_placeholder_0) AND (civicrm_value_volunteering__9.validated__200 = :db_condition_placeholder_1)) LIMIT 11 OFFSET 0; Array ( [:civicrm_activity_activity_type_id] =&gt; 66 [:civicrm_activity_source_contact_id] =&gt; 20 [:db_condition_placeholder_0] =&gt; 0 [:db_condition_placeholder_1] =&gt; 1 )</p>
  <p>Is that the right method for adding a contextual filter to that type of View.
  Or is there another way?</p>
  <p>Olly</p>
  
Tags: <drupal-views><civicrm-entity><drupal-8>
Title: Drupal 8 CiviCRM Entity and Views activities
ThreadText: # Drupal 8 CiviCRM Entity and Views activities
  
  (Asked by: username_0 on 2020-07-13)
  
  We have been working on Views, with Civi Entity, on Drupal 8.
  
  We are having an issue a list of Activities and filters.
  We only want to load Activities where the source contact is a particular Contextual filter (contact ID). But adding a Contextual Filter of 'CiviCRM Activity (CiviCRM Entity): Activity Source Contact' leads to an error.
  
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'civicrm\_activity.source\_contact\_id' in 'where clause': SELECT civicrm\_activity.id AS id FROM {civicrm\_activity} civicrm\_activity LEFT JOIN {civicrm\_value\_volunteering\_\_9} civicrm\_value\_volunteering\_\_9 ON civicrm\_activity.id = civicrm\_value\_volunteering\_\_9.entity\_id WHERE (((civicrm\_activity.activity\_type\_id = :civicrm\_activity\_activity\_type\_id)) AND ((civicrm\_activity.source\_contact\_id = :civicrm\_activity\_source\_contact\_id))) AND ((civicrm\_activity.is\_deleted = :db\_condition\_placeholder\_0) AND (civicrm\_value\_volunteering\_\_9.validated\_\_200 = :db\_condition\_placeholder\_1)) LIMIT 11 OFFSET 0; Array ( [:civicrm\_activity\_activity\_type\_id] => 66 [:civicrm\_activity\_source\_contact\_id] => 20 [:db\_condition\_placeholder\_0] => 0 [:db\_condition\_placeholder\_1] => 1 )
  
  Is that the right method for adding a contextual filter to that type of View.
  Or is there another way?
  
  Olly
  
  **Tags:** drupal-views, civicrm-entity, drupal-8
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-12-11. Score: 2
  
  Here's a working example of "My Activities"
  Olly: you should just be able to change Assignee to Source for your use case (in Configure Relationship Contact)
  
  Code: git repo -> last commit ->
  
  ```
  commit bb1f503bd67d1537a16b28022a4f2444883ef231
  Author: Rob Ellis <>
  Date:   Sun Oct 11 23:21:17 2020 +0000
  
      Changed views contact subtype default arg to return "<none>" for users without a subtype
  
  ```
  
  [![enter image description here](https://i.sstatic.net/enjgl.png)](https://i.sstatic.net/enjgl.png)
  
  [![enter image description here](https://i.sstatic.net/eYry8.png)](https://i.sstatic.net/eYry8.png)
  
  [![enter image description here](https://i.sstatic.net/FPlI7.png)](https://i.sstatic.net/FPlI7.png)
  
  [![enter image description here](https://i.sstatic.net/OsSW3.png)](https://i.sstatic.net/OsSW3.png)
  
  
  ---
  
  ### Answer by username_2 on 2020-07-13. Score: 1
  
  This is a known [issue](https://github.com/eileenmcnaughton/civicrm_entity/issues/202) which is locked in github repo. There is a [work in progress to fix](https://github.com/eileenmcnaughton/civicrm_entity/pull/204) the issue.
  
  You can try applying the below patch in your d8 install to see if it resolves your problem
  
  * <https://patch-diff.githubusercontent.com/raw/eileenmcnaughton/civicrm_entity/pull/213.patch>
  * <https://patch-diff.githubusercontent.com/raw/eileenmcnaughton/civicrm_entity/pull/204.patch>
  
  > **Comments:**
  > **username_3**: I'm having the same problem. I tried applying the two patches and this didn't help in my case. I'm using the 8.x-3.x branch directly from the github repo. Do you have any suggestions?  
  > **username_1**: I have this working on a site - will find/extract/post the yaml once I have some espresso.  
  
  ---
  
  