In automation, I have a rule that runs daily, using this query:
Filter="Issues in Open Sprint" and status not in (Done,"Ready for Release",Cancelled,Declined) and resolution is empty
It does a lookup based on this JQL:
Filter="Issues in Open Sprint" and status not in (Done,"Ready for Release",Cancelled,Declined) and resolution is empty and assignee = "john.smith@company.com"
Then I do an if matches on {{lookupIssues.size}} equals 0
If that matches, I want it to send out ONE email. It looks to be sending out an email for every issue returned from the JQL!
How can I get it to send only ONE email?
For some more color, the objective here is to get an email if there are NO issues that match the query (I'm trying to find out if I have a developer that has no issues on their plate).
This is the rule:
Hello @Cash Coyne
With a Schedule trigger the actions within the rule will be run once for each issue returned in the JQL associated with the trigger.
What is the CurDev variable being set to? What is its purpose?
Why do you have a JQL in the trigger and then use a Lookup Issues action to run the same JQL with an additional criteria for Assignee? Why don't you have the Assignee criteria in the JQL in the trigger?
CurDev isn't really needed. I need to remove that. I have the JQL in the trigger without the assignee to limit the number of issues at that point. Then with the assignee for the lookup as I plan to repeat this sequence for a few different assignees. The end objective is to total the number of issues that match lookup and then send out an email with that total number for each assignee (thus each lookup).
My problem is how to get just one email sent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is one solution:
Take the JQL out of the Schedule trigger. Then the steps in the rule will run only once each time the schedule triggers the rule
Add multiple Lookup Issues actions to run the filter for each assignee.
After each Lookup Issue action add a Create Variable action to record the number of issues returned.
Finally, as the last step, use a Send Email action to send the information. You can include each variable you created in email content.
I think there might be another way to run the Lookup Issue action just once without including an Assignee criteria and then using something like the distinct function to get the count of issues for each distinct assignee in the result set. But I don't have an example of that and haven't worked out the details. I think this post might be discussing something similar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That worked. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BTW, I checked the link you provided and it has possibilities, but the problem is that it only works when issues are found for an assignee. If an assignee has no issues then I can't identify that someone has no issues, so a Catch-22 type thing. But the steps you recommended before the link did the trick.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.