Answers.Body: <p>Your rule is set for All Contacts. Have you tried setting it for Activity Target - it doesn't explain why it isn't working for 'All Contacts' but worth confirming I think</p>
  <p><a href="https://i.sstatic.net/0ATct.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0ATct.png" alt="enter image description here" /></a></p>
  <p>If that makes no difference then there is also the option to add a Condition to specify the Target</p>
  <p><a href="https://i.sstatic.net/eNlqP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/eNlqP.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-16T20:55:53.433Z
Answers.Text: Thanks for these suggestions. Unfortunately the results are the same: the rules aren't triggered for the targets. Analysing the issue a little further, I think my conclusion is that this kind of rule doesn't work for targets; it only works for sources. For example, if I do set trigger for all contacts, and relax the linked conditions, I can get the rule to trigger for the sender of the email, but again not for the receiver of the (volunteer application form email). Thanks again for your interest.
Answers.UserDisplayName: gillenpj
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-17T22:36:35.640Z
Answers.Text: and no random glitch like the target in question is On Hold or Do Not Email?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-18T08:40:19.397Z
Answers.Text: No, I double checked this just case. And anyhow I get the same results if I swap out the Email action for a Tagging action (see row 2 in table above). For some reason the trigger doesn't appear to get activated for the Target.
Answers.UserDisplayName: gillenpj
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-19T05:30:56.237Z
Answers.Text: does this shed any light, or is it just covering same ground you have? https://civicrm.stackexchange.com/questions/34887/send-an-email-to-activity-targets-when-activity-is-created-via-the-api
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-20T12:16:20.037Z
Answers.Text: Hi Petednz. Thanks for this reference. If I understand its gist correctly it seems to confirm that it should be possible to do what I'm trying to do, i.e., CiviRules should be able to accomplish this. However, there appears to be something not quite working right on CiviCRM (at least on WordPress), based on my observations summarized in the table above.
Answers.UserDisplayName: gillenpj
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-16T19:09:00.863Z
Answers.LastActivityDate: 2022-12-16T19:09:00.863Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I'm trying to build a CiviRule to chase a volunteer for an application form, two weeks after the application form has been emailed to them, by sending them a second email reminding them of the outstanding application form. (In the version of the rule shown in the screenshot, I've turned off the 2-week delay for testing purposes.)</p>
  <p>The application form is (manually) emailed to the volunteer, creating the Activity of type &quot;Email&quot; with subject &quot;Volunteer Application Form&quot;. So I search for volunteers with incomplete application forms (via a smart group, which I've tested) after a new activity of type 'Email' and subject 'Volunteer Application Form' is added. That's the theory at least but the rule never triggers. I've tried lots of different attempts, including not using a smart group, but to no avail. The closest I've gotten to success is I remove the need to be a volunteer then the rule triggers for me, the person carrying out the activity of sending the application form to the volunteer, but this isn't what I want--and in that case also, the volunteer himself/herself never gets the chaser.</p>
  <p>Please let me know if you have any suggestions, or different ways of approaching the same problem. Thanks!</p>
  <p><a href="https://i.sstatic.net/5pVEh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5pVEh.png" alt="Screenshot of CiviRule" /></a></p>
  <p>Per a helpful suggestion from Lars below, and after further experimentation, I'm now fairly sure there is a bug in CiviRules.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Test</th>
  <th>Trigger</th>
  <th>Linked Condition</th>
  <th>Linked Action</th>
  <th>Action</th>
  <th>Outcome</th>
  <th>As Expected</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>Activity is added: Trigger for <strong>all contacts</strong></td>
  <td>Null</td>
  <td>Add Tag to Contact</td>
  <td>Phone Call or Meeting</td>
  <td><em>Only</em> Target is tagged</td>
  <td>No</td>
  </tr>
  <tr>
  <td>2</td>
  <td>Activity is added: Trigger for <strong>all contacts</strong></td>
  <td>Null</td>
  <td>Add Tag to Contact</td>
  <td>Email</td>
  <td><em>Only</em> Source is tagged</td>
  <td>No</td>
  </tr>
  <tr>
  <td>3</td>
  <td>Activity is added: Trigger for <strong>Activity Target</strong></td>
  <td>Null</td>
  <td>Add Tag to Contact</td>
  <td>Email</td>
  <td><em>Neither</em> Target nor Source is tagged</td>
  <td>No</td>
  </tr>
  <tr>
  <td>4</td>
  <td>Activity is added: Trigger for <strong>Activity Source</strong></td>
  <td>Null</td>
  <td>Add Tag to Contact</td>
  <td>Email</td>
  <td><em>Only</em> Source is tagged</td>
  <td>Yes</td>
  </tr>
  </tbody>
  </table>
  </div>
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-16T22:40:49.653Z
Comments.Text: Have you tried removing one of the conditions at a time and seeing when it will or won't trigger? That should help narrow it down and is the approach I use when CiviRules isn't working as expected.
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-17T11:12:59.973Z
Comments.Text: Thanks! This is (always) a helpful suggestion when diagnosing a problem. I've done some more experimentation and summarised my observations in the table added above.
Comments.UserDisplayName: gillenpj
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-17T16:11:17.730Z
Comments.Text: That's interesting. I just tried the first row of your table on the Drupal 7 demo site and it worked as expected (all three contacts tagged). So you might want to try these on the demo site for D7 or Wordpress or whatever you are using to help narrow down where the issue is. It might be something specific to your site.
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-17T18:16:01.573Z
Comments.Text: I hadn't been filling in Assignee but if I do then for the first row only the Target and the Assignee are tagged, not the Source, on my site (CiviCRM running on WordPress running on CiviHosting). Am I correct in understanding that Target means the contact to whom the action is being done, e.g., the person who is being phoned; Source means the contact who has raised the action, e.g., me a logged on user; and Assignee means whomever the Source has assigned the task to? Where can I find the Drupal 7 demo site? Thanks again.
Comments.UserDisplayName: gillenpj
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-17T19:23:46.103Z
Comments.Text: At the bottom of the page here, you can find the testing sandboxes: https://civicrm.org/demo
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-17T19:25:39.050Z
Comments.Text: Yes, source is added by (by default the logged in user, but can be changed), the target is who it is being done to (also called "with", confusingly) and the assignee is as you write.
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-17T20:34:42.013Z
Comments.Text: Thanks, Lars. I'm able to recreate the first two rows of my table above -- giving "unexpected outcomes" -- using the testing sandbox for WordPress. So, at least I can conclude it's nothing something weird with my site (unless I'm making some stupid mistake which I'm not seeing yet).
Comments.UserDisplayName: gillenpj
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-17T20:45:14.687Z
Comments.Text: And a final observation from me: I'm able to recreate what you saw in testing sandbox for Drupal 7, i.e., for row 1 of my table that site gives the expected result; however for row 2 of my table that site also gives the same unexpected result as shown in my table for that row, i.e., only Source is tagged. So, in summary, the first two rows don't appear to work in WordPress and the second row doesn't appear to work in Drupal 7. (I've not tested the remaining two rows in either testing sandbox, but I assume the results for the testing sandbox for WordPress are the same as shown in my table.)
Comments.UserDisplayName: gillenpj
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-17T22:55:58.990Z
Comments.Text: That's odd that you get different behaviour in Drupal versus WP. But I guess someone would need to fire up the debugger to go any further with this - either you or someone you hire.
Comments.UserDisplayName: Lars SG
Tags: <civirules>
Title: CiviRule to chase volunteer for application form two weeks after it has been sent
ThreadText: # CiviRule to chase volunteer for application form two weeks after it has been sent
  
  (Asked by: username_0 on 2022-12-16)
  
  I'm trying to build a CiviRule to chase a volunteer for an application form, two weeks after the application form has been emailed to them, by sending them a second email reminding them of the outstanding application form. (In the version of the rule shown in the screenshot, I've turned off the 2-week delay for testing purposes.)
  
  The application form is (manually) emailed to the volunteer, creating the Activity of type "Email" with subject "Volunteer Application Form". So I search for volunteers with incomplete application forms (via a smart group, which I've tested) after a new activity of type 'Email' and subject 'Volunteer Application Form' is added. That's the theory at least but the rule never triggers. I've tried lots of different attempts, including not using a smart group, but to no avail. The closest I've gotten to success is I remove the need to be a volunteer then the rule triggers for me, the person carrying out the activity of sending the application form to the volunteer, but this isn't what I want--and in that case also, the volunteer himself/herself never gets the chaser.
  
  Please let me know if you have any suggestions, or different ways of approaching the same problem. Thanks!
  
  [![Screenshot of CiviRule](https://i.sstatic.net/5pVEh.png)](https://i.sstatic.net/5pVEh.png)
  
  Per a helpful suggestion from username_1 below, and after further experimentation, I'm now fairly sure there is a bug in CiviRules.
  
  | Test | Trigger | Linked Condition | Linked Action | Action | Outcome | As Expected |
  | --- | --- | --- | --- | --- | --- | --- |
  | 1 | Activity is added: Trigger for **all contacts** | Null | Add Tag to Contact | Phone Call or Meeting | *Only* Target is tagged | No |
  | 2 | Activity is added: Trigger for **all contacts** | Null | Add Tag to Contact | Email | *Only* Source is tagged | No |
  | 3 | Activity is added: Trigger for **Activity Target** | Null | Add Tag to Contact | Email | *Neither* Target nor Source is tagged | No |
  | 4 | Activity is added: Trigger for **Activity Source** | Null | Add Tag to Contact | Email | *Only* Source is tagged | Yes |
  
  **Tags:** civirules
  
  > **Comments:**
  > **username_1**: Have you tried removing one of the conditions at a time and seeing when it will or won't trigger? That should help narrow it down and is the approach I use when CiviRules isn't working as expected.  
  > **username_0**: Thanks! This is (always) a helpful suggestion when diagnosing a problem. I've done some more experimentation and summarised my observations in the table added above.  
  > **username_1**: That's interesting. I just tried the first row of your table on the Drupal 7 demo site and it worked as expected (all three contacts tagged). So you might want to try these on the demo site for D7 or Wordpress or whatever you are using to help narrow down where the issue is. It might be something specific to your site.  
  > **username_0**: I hadn't been filling in Assignee but if I do then for the first row only the Target and the Assignee are tagged, not the Source, on my site (CiviCRM running on WordPress running on CiviHosting). Am I correct in understanding that Target means the contact to whom the action is being done, e.g., the person who is being phoned; Source means the contact who has raised the action, e.g., me a logged on user; and Assignee means whomever the Source has assigned the task to? Where can I find the Drupal 7 demo site? Thanks again.  
  > **username_1**: At the bottom of the page here, you can find the testing sandboxes: https://civicrm.org/demo  
  > **username_1**: Yes, source is added by (by default the logged in user, but can be changed), the target is who it is being done to (also called "with", confusingly) and the assignee is as you write.  
  > **username_0**: Thanks, username_1. I'm able to recreate the first two rows of my table above -- giving "unexpected outcomes" -- using the testing sandbox for WordPress. So, at least I can conclude it's nothing something weird with my site (unless I'm making some stupid mistake which I'm not seeing yet).  
  > **username_0**: And a final observation from me: I'm able to recreate what you saw in testing sandbox for Drupal 7, i.e., for row 1 of my table that site gives the expected result; however for row 2 of my table that site also gives the same unexpected result as shown in my table for that row, i.e., only Source is tagged. So, in summary, the first two rows don't appear to work in WordPress and the second row doesn't appear to work in Drupal 7. (I've not tested the remaining two rows in either testing sandbox, but I assume the results for the testing sandbox for WordPress are the same as shown in my table.)  
  > **username_1**: That's odd that you get different behaviour in Drupal versus WP. But I guess someone would need to fire up the debugger to go any further with this - either you or someone you hire.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-12-16. Score: 0
  
  Your rule is set for All Contacts. Have you tried setting it for Activity Target - it doesn't explain why it isn't working for 'All Contacts' but worth confirming I think
  
  [![enter image description here](https://i.sstatic.net/0ATct.png)](https://i.sstatic.net/0ATct.png)
  
  If that makes no difference then there is also the option to add a Condition to specify the Target
  
  [![enter image description here](https://i.sstatic.net/eNlqP.png)](https://i.sstatic.net/eNlqP.png)
  
  > **Comments:**
  > **username_0**: Thanks for these suggestions. Unfortunately the results are the same: the rules aren't triggered for the targets. Analysing the issue a little further, I think my conclusion is that this kind of rule doesn't work for targets; it only works for sources. For example, if I do set trigger for all contacts, and relax the linked conditions, I can get the rule to trigger for the sender of the email, but again not for the receiver of the (volunteer application form email). Thanks again for your interest.  
  > **username_2**: and no random glitch like the target in question is On Hold or Do Not Email?  
  > **username_0**: No, I double checked this just case. And anyhow I get the same results if I swap out the Email action for a Tagging action (see row 2 in table above). For some reason the trigger doesn't appear to get activated for the Target.  
  > **username_2**: does this shed any light, or is it just covering same ground you have? https://civicrm.stackexchange.com/questions/34887/send-an-email-to-activity-targets-when-activity-is-created-via-the-api  
  > **username_0**: Hi username_2. Thanks for this reference. If I understand its gist correctly it seems to confirm that it should be possible to do what I'm trying to do, i.e., CiviRules should be able to accomplish this. However, there appears to be something not quite working right on CiviCRM (at least on WordPress), based on my observations summarized in the table above.  
  
  ---
  
  