Forums

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

How to get stories assigned to an epic while the epic is linked to a specific Task

Sabine Rommel November 19, 2018

Hi all,

because we are lacking a higher level than the epic we introduced the issue type "feature". A "feature" can have 1 to n epics, while an epic can have 1 to n stories. What I am now struggling with is to get all stories where the epic is linked to a specific feature. I thought of a nested jql query but this is not really working. Something like that

"Epic Link" in ("issue in linkedIssues(PLS-1)") -> "PLS-1" is the "key" of the "feature" 

would be very cool, but unfortunately this is not working. Any ideas how I can solve this? Many thanks in advance.

Best Sabine

3 answers

2 accepted

1 vote
Answer accepted
Bryan McMillan
Contributor
November 19, 2018

Sabine,

 

I am going to assume based on your question that you have ScriptRunner installed.  That being the case you can perform a recursive JQL query to pull the entire hierarchy.  To use ScriptRunner to pull this off use this command:

issueFunction in linkedIssuesOfRecursive("Issue = PLS-1")

Now this will recursively traverse all the way down the hierarchy from PLS-1 grabbing all of the Epics linked to the Feature and all of the Stories linked to the Epic then all of the Sub-Tasks linked to each Story.  If you wish to limit the depth you can also use the linkedIssueOfRecursiveLimited command.

Regards,

Bryan McMillan

Sabine Rommel November 19, 2018

Hi @Bryan McMillan, this is working perfectly. Thanks a lot

Best Sabine

1 vote
Answer accepted
Alexey Matveev
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.
November 19, 2018

Hello,

You could use the Power Scripts add-on:

 https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

Your JQL query would look like this:

 key in issueInEpics("key in issuesLinkedAtDepth(\"key = PLS-1\", \"LinkType\")") 
Sabine Rommel November 19, 2018

thanks a lot but I do not have this plugin installed

1 vote
Bryan McMillan
Contributor
November 19, 2018

Sabine,

 

Alexey's solution/answer is far better though.

 

Regards,

 

Bryan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events