Hello,
TLDR: Lookup Issues action used to send a single email list to a user for all their assigned issues using a "distinct" smart value essentially breaks when "Run a JQL search" is enabled on the Scheduled trigger, which is done to enable an additional action (Add a comment to the issue).
Details:
I'm attempting to create a Jira automation which does 2 things:
1. sends a single email to the assignee of all issues returned by the jql query, for all issues they are assigned to.
For example, if I have 5 issues and 2 are assigned to user A and the other 3 to user B, then User A will get an email with their 2 issues, and user B will get one email with their 3 issues.
This approach (use a Lookup issues action, which runs a jql query) as documented by Atlassian works perfectly for that. However...
2. Add a comment to every Jira issue that was returned by the same jql query, in the same automation as above.
I thought this would be as simple as adding a "add comment" action, but when I try that, I get this error:
The only remedy I've found for this error, is to go back to the automation trigger (a Scheduled trigger), and enable "Run a JQL search and execute actions for each issue in the query":
Now, this works just fine - it does add the comment to the issues returned... but it breaks #1 above and instead of User A and User B each getting a single issue with their respective lists of issues assigned, they each now get one email for every issue. So each of these actions work perfectly on their own, but do not work properly when part of the same automation.
Any suggestions? Thank you very much in advance!
Following that how-to article helps to send one-email-per-assignee with their respective issues: https://confluence.atlassian.com/jirakb/automation-to-send-email-only-once-per-assignee-1310985609.html
Please note that the rule uses the advanced branch over Assignees and not issues. As a result, the Comment on Issue action has no issues on which to act. That is what the generic error means: the action / condition needs an issue and one is not present at that point in the rule.
If you want to add comments to the issues, the rule would need to separately branch on issues. (But not add JQL to the scheduled trigger, as that would create other problems for this type of rule.)
Before you add that, what is the purpose of the comment you adding? To which issues does it apply?
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.