Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to loop on Epic issues in automated release email

Maroun Maroun March 15, 2023

Hi,

 

I have the following automation for releases:

 

Dear team,

The following issues have been released as part of the {{release.name}} release:

{{#lookupIssues}}
- {{key}}: {{summary}}
{{/}}

Thank you

 in the JQL filter, I have only the fix version:

 

fixVersion = '{{version.name}}'

 

The problem is that the above email generates only the Epic's name. But I want to have the epic, the stories (or subtasks), and their subtasks. Something like:

 

- Epic
- Story 1
- Subtask 1
- Subtask 2
- Task 1
...

 

I add the "Fix version" only to the epic itself, not the subtpyes. I need to modify the JQL to include subtasks of the epic that has the version. I tried:

 

parent = '{{issue.key}}' AND fixVersion = '{{version.name}}' AND issuetype = Sub-task

but no luck.

How can I achieve this? 

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 15, 2023

Hi @Maroun Maroun 

First thing: Unless you have only one epic and one story in a release, this may be difficult / not-work-how-you-want-it-to-look in the report.  For specific reporting needs like this you may want to investigate the marketplace for better release reporting.  There may be free options in the marketplace to do this.

If you still want to try this in a rule, it might be possible if you do this:

  • Create a custom field in *all* of your epic, story, and sub-tasks to represent a sorting key, composed of the concatenated values of your version-name, epic-key, story-key, and sub-task-key.  One tricky part of that is formatting the concatenated values to enforce the sort order correctly.
  • Create several automation rules which somehow keeps that sorting key up to date
  • Create a release report rule, using lookup issues and JQL to gather the issues, sorted on your custom field (i.e., ORDER BY sortingKey ASC)
    • Now comes the trickier part: iterate over the issues in the lookup, using smart value list filtering on issue type, to manage the indentation level before listing the issue information.
  • Test this set of rules a lot...probably in a test project

Please note this may be a really brittle solution, so I again encourage checking the marketplace first.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events