Forums

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

Native jql for all stories and tasks of high priority epics

Matt P July 17, 2019

Hi all,

Is it possible to query all of the stories and tasks within high priority epics using Jira Cloud without Script Runner? This does not need to include Sub-tasks. 

I have tried parentEpic in ("filter = 'filterName'"), but it seems native jql does not support subqueries? 

I think it would be possible with Script Runner: 

issueFunction in issuesInEpics("Priority = Highest AND other criteria")

 or call another filter as the subquery.

 

Any thoughts on doing this without Script Runner? 

 

 

2 answers

1 accepted

0 votes
Answer accepted
Ignacio Pulgar
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.
July 18, 2019

Hi Matthew,

You're right; parentEpic does not support subqueries but just a CSV of epic's issue keys like:

parentEpic in (KEY-1, KEY-2, KEY-3)

There's no way to get issues belonging to a high priority epic by native JQL functions.

Some workarounds could be designed, based on adding the following post-function (natively included in all Jira Cloud instances): Copy field value from linked issues (JMWE app)

post-function.PNG

Please, note that the workaround wouldn't be elegant nor a good practice.

Regards

Matt P July 18, 2019

Noted, thank you Ignacio.

I've thought about that as well, but we do want to prioritize stories and tasks within each epic separately from the epic itself. (If I understand the workaround correctly, all children of the Epic would have the same priority level?). 

For today, I've just listed the high priority epics in the search manually, and we will get one of the plugins to automate it soon.

Ignacio Pulgar
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.
July 22, 2019

The Destination field could be changed to a new custom field, created for that specific purpose, so that tasks could have different priorities than the epic they belong to.

The workaround could be set in a quite satisfactory way, though it would require a quite long explanation. I'm thinking of writing an article about it... I'll let you know once it's done! ;)

Regards

Matt P July 22, 2019

Yes, I've thought of a separate "Epic Priority" field that would control a field in each of the child issues (your destination field), but this wouldn't let us reprioritize epics while in-progress. Or if we did reprioritize, we'd need a workflow transition to run the post-function to update the fields of the child issues. 

Unless I'm missing a big way of keeping fields synced between workflow transitions / forcing child issues to maintain up-to-date inherited fields of their parent issues.

Interested to see the article, definitely share when it is done.

Ignacio Pulgar
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.
August 8, 2019

Hi @Matt P!

Here we are the promised article.

The solution I was thinking of would be the last use case in the article, applied to the Priority of the Epics (see Use case: Edit permission on the field level), so that the Priority could only be edited by executing a transition.

Add the post-function Copy field value from linked issues (JMWE app) to the same global reflexive transition in order to synchronize the Epic's Priority field with the Epic Priority field in its stories.

Please, note that the mere act of adding a Story to an Epic wouldn't set its Epic Priority field, but the Copy field value from linked issues (JMWE app) post-function could be added to all of the Story transitions to force a refresh. Besides, using the global reflexive transition in the Epic can modify the Epic Priority of all its stories.

Hope it helps.

0 votes
Nikhil July 18, 2019

Hi @Matt P 

 

We can get the list  linked issues that are in different status using the plugin"JQL Search Extensions"

JQl:- issue in allIssuesInEpic("priority = High") gives you the list of all the issues and subtasks of epics for priority  is High 

Documentation can be found here

 

Regards,

Nikhil

Matt P July 18, 2019

Thank you Nikhil, I didn't realize there were various plugin options for search, so that is nice to know. Was still hoping for a native jql solution, but alas, it seems not to be possible.

Nikhil July 18, 2019

Yeah its not but you can definitely its easy to use a plugin which helps you for better reporting, hope atlassian will help us.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events