I'm going crazy trying to get an automation working. What I'd like to do is send ONE email that includes details for each Parent/Epic currently Open or In Progress, along with details for the Child tasks under each Parent.
Between Lookup actions, creating variables, and so on I feel like I've tried everything. And because of Jira's limitations with using variables outside of branches I keep running into the same issue, but I feel like I'm so close and there HAS to be a way to do this, right?
Ideally, the sections in the email would look like this for each Parent, with each issue key being linked to the issue:
ABC-001 Parent Epic One
ABC-002 Child Issue One, In Progress
ABC-003 Child Issue Two, Blocked
ABC-004 Child Issue Three, Open
ABC-005 Parent Epic Two
ABC-006 Child Issue One, Blocked
ABC-007 Child Issue Two, Blocked
etc, etc.
Here's the automation that got me the closest. In this one, the steps for creating the {{epicBlock}} variable would be completed, but then the automation would just stop after. No error codes in the audit log either. Up to that step, all the variables and lookups function as I expect them to. The advanced branching/rule group setup was only one of my many attempts to find a work-around, so if they're not necessary let me know.
Hi @Erin Lee
Short answer: I do not believe there is a simple, generic way to do this with the format you show with an unknown list of Epics. There are some workarounds, such as with an HTML table, although that will repeat the Epic information.
For example, if the lookup only found the work items with an Epic parent, ordering the results by the Epic's summary and then the child Keys:
project = myProject
AND parent IS NOT EMPTY
AND issuetype IN (Story, Task, Bug)
ORDER BY Parent ASC, Key ASC
The rows could be (with no HTML formatting added)
{{#lookupIssues}}
{{parent.key}} -- {{parent.summary}} : {{key}} -- {{summary}}
{{/}}
Unfortunately, this will repeat the parent Epic information for each row, and they will sort by the Parent's summary rather than by the key.
There might be another way to do this with dynamic list creation, but I will need to ponder that a bit.
Kind regards,
Bill
Hi Bill!
Thanks for your response. Have you had a chance to look into the dynamic list creation you mentioned?
The lookup action will work for now, it's just not formatted as nicely as I wish it was.
-Erin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Erin Lee
Yes, I did look at that again...the dynamic list-filtering approach is needed for several other problem scenarios I wanted to solve. However, it still does not work. (The reason is there is a defect with long-format, list iterators where many functions can only "see" the first record, and so filtering over the second, third, etc. is not possible.)
For now, you could try the iteration approach I described and add HTML formatting to create a table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I recommend doing a quick internet search for some basic HTML guides to get started. And, check for the email tools your recipients will use to ensure you do not use any table markup which is not supported.
You may also review this example in a knowledgebase article to add an HTML table for a work item. The change for your scenario is to add the iteration of the lookup results to add each data row.
https://support.atlassian.com/automation/kb/creating-a-table-structure-in-jira-automation-rules/
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.