Hi All -
Hoping to get help with something a little more complicated. I am querying all "critical issues" in a project. All of that works well for me. I can report the necessary fields for each issue via email - ultimately showing all critical issues & and the fields I am calling.
What I am wondering is if anyone has a clever way to group each critical issue under their parent as a header in a single email. The end result would look something like this:
Parent ABC
Parent DEF
I have done something similar to this before, but each parent had its own email, and iterated through it's children individually.
Hi. @Alex
Try set up a rule with a Schedule Trigger and use a JQL query like project = "YourProjectKey" AND priority = Critical (this will fetch all critical issues). Then, add a Lookup Issues action with the same JQL to gather these issues
Now In the email, try to use smart values to dynamically group issues by their parent. Here’s an example for the email body:
{{#lookupIssues}}
{{#if(parent.key)}}
Parent: {{parent.key}} - {{parent.summary}}
{{/if}}
- {{key}} | {{status.name}} | {{customfield_12345}} | {{customfield_67890}}
{{/}}
This will iterate through the issues, display the parent as a header, and list all its child issues below it. (Replace customfield_12345 and customfield_67890 ) with the IDs for the fields you need.
Test n see if it works , googluck!
Dd
Hi @Alex
One way I have seen to do that unfortunately requires adding a "sort key" custom field to all of the issues, allowing the parent (e.g., Epic) to appear before their child issues. That custom field would be set by another automation rule prior to the need for reporting.
Gather the issues with Lookup Issues with JQL and ORDER BY that sorting, custom field, and then use conditional logic on the issue type for the different formatting styles in your message body.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.