Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Scriptrunner JQL for all issues and sub-tasks for an Epic

Stu
Contributor
May 15, 2019

Sorry if this has been asked many times before, but previous answers aren't working for me.

I have Scriptrunner installed, and would like the JQL to return all my issues and subtasks of those issues for a particular Epic.

 

Many thanks :)

2 answers

2 votes
Brian Spence
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.
February 27, 2020

I believe this is what Gezim is suggesting, but the basic JQL to return all the issues in a set of Epics, along with the sub tasks of those issues would look like:

 

issueFunction in issuesInEpics("key in (EPIC-12345, EPIC-67890)") OR issueFunction in subtasksOf("'Epic Link' in (EPIC-12345, EPIC-67890)")

 

Just insert your Epic keys for the italics text.

The Adaptavist recommendation involves creating two filters, but I find it easier to do it all in one.  

2 votes
Gezim Shehu [Communardo]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 16, 2019

Hi,

 

You can use this:

issueFunction in issuesInEpics("labels in (AWS)")

 

issuesInEpics - returns all issues of epics in subquery ().

In my case I searched for all epics containing the label AWS, but you can simply replace that with the issue key only for 1 Epic.

 

Cheers

Stu
Contributor
May 19, 2019

Hi i tried this...

issueFunction in issuesInEpics("ICS-526")

Where ICS-525 is the epic that I want to get the issues and sub-issues for.  It didn't work.  I think I'm missing some jql.

Just to confirm, does your script above include the issues, as well as the issue sub-tasks?

Thanks

Gezim Shehu [Communardo]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2019

You would have to also add

issueFunction in subtasksOf(....)


Subtasks of issues have no information if issue is related to an epic or not. The subtask can be related though

Gezim Shehu [Communardo]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2019

Kindly mark as accepted, if it solved your issue.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events