Hi there!
I am trying to create an automation based on when a version releases. For now, though, I'm basing it off of "scheduled" so I have more control over kicking it off. The goal:
I tried a lookup, and then sending email, but I got 100 individual emails, when really I'm expecting 2 tickets. So something with the lookup was not right. And, I can't stress this enough, I do NOT want an email for every single ticket.
What can I do here?
Hi @Louise Baker
Use a list code to sent all information in a single email.
Example:
{{#lookupIssues}}
* {{key}} | {{summary}} | {{assignee.displayName}} | {{url}}
{{/}}
You will need a lookup.
Also see this KB as a guideline/example, automation-rule-to-send-single-email-for-all-issues-per-assignee-due-next
NOTE, it might alos work by replacing #lookupIssues, with #issues
thanks!
I tried this, but:
- my lookup returned ENTIRELY too many tickets
- i received an email for every single lookedup issue.
So, assuming I had my lookup wrong, I can't figure out how to do the lookup. Since I'm doing this within a branch, I am having a hard time writing the JQL.
What I wrote, and this was BELOW the audit portion in my first image
What this returned was 100 issues in ISHELP w/ jira_escalated. It ignored the fact that this was within a FOR LINKED ISSUES branch, really.
So, how can I write JQL to only find linked issues with the label jira_escalated, SO LONG AS the linked issues were in the fix version I'm releasing? That's where I'm losing it in the JQL.
I can troubleshoot the email part after.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think to get the right items, you would need to set the fixed version on the linked issues as well.
So you would need an automation that sets the fixed version, when released, on all linked issues from ther issues in the release version, or a new custom field to store this.
Then have a second rule that can be triggered by another rule and there find all issues with the released version name and the required label and then sent an email with the found issues
The option you want is not possible in a single rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm. I see. We have a policy at our company that we do not attach a fix version to something that it itself was not worked on / fixed, so this might not be a possibility for us.
I'll try to think of something else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...to the suggestions from @Marc -Devoteam- to use the Lookup Work Items action to gather the items for one email...
Because you want to first get the work items with the specific Fix Version value, and then gather those items linked ones, filtering them by their labels, this would require two uses of the lookup action and some careful JQL:
I recommend first writing the relevant JQL expressions and testing them outside of the rule with example Fix Version values. Once they work as expected, substitute in the smart values for use in the lookup actions.
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.
thank you. i followed you until the second lookup.
ignoring that I'm using fixVersion wrong, just a placeholder,
let's say the first JQL is:
project="IS" and fixVersion={{fixVersion}} and issueLinkType IS NOT EMPTYreturn all tickets in this fix version that have a linked issue
My second JQL string would be something like:
linkedIssue IN ({{lookupIssues}}) and label = jira_escalatedIs that what you mean? If not, I am not entirely quite sure what to do here. I'm sorry!
I tried what I wrote here, and getting the error of "A search during custom value definition found no work items." in the second lookup step
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that looks correct for your first JQL. You may want to further limit by issue type and status, as needed.
For the second lookup's JQL, let's add a helper variable first to contain all of the linked issues for the ones in the first lookup.
{{#debug}}{{lookupIssues.issuelinks.inwardIssue.key.flatten.join(",").concat(",").concat(lookupIssues.issuelinks.outwardIssue.key.flatten.join(",")).split(",").match("^(..*)").distinct.join(", ")}}{{/}}
That looks a bit messy, and what it does is:
That variable could be used in this JQL:
project = "IS"
AND (
(
key IN ( {{lookupIssues.key.join(", ")}} )
)
OR
(
key IN ( {{varLinkedKeys}} )
AND issueType IN ( your desired types )
AND labels IN ( jira_escalated )
)
)
This would gather all the work items from the first lookup, plus their linked issues meeting your criteria of having that specific label. I added a clause for testing the issue types again for you to fill in.
I recommend testing that with some example versions / work items before updating anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill, you are truly amazing. This is not the first time you've helped me out, and when I was searching the heck out of this on these forums, I saw you present on nearly every answer, providing insightful and detailed information.
Thank you immensely. Truly.
"Rising Star" - more the the star! I always am grateful when I see your name pop up in a thread I post / follow :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To achieve this, you will need to use the "Lookup Issues" action: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Tudor!
I did attempt a lookup, if you'll see in my original post, but it ignored the very critical piece where I want to find issues that are LINKED TO issues in the fix version. So, either wrong JQL (likely), or something else
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.