How to write a JQL using IssueFunction to show all Sub-tasks of User Stories with a specific Status Edited

Hi!

I'm looking for a JQL that gives all Sub-tasks of parent User Stories that have a specific status in our workflow (New, In Refinement, Ready for Poker, Ready for Sprint). 

On our Scrum Boards we are already using a filter query with IssueFunction in subtasksOf to show all stories of a specific team working in a specific project. That query is written as:

project = DI and Team = 162 OR Project = DI AND issueFunction in subtasksOf("project = DI AND Team = 162" ) ORDER BY Rank

When I add an extra search for specific statuses within the parentheses the query is not giving back the expected results.  

Hopefully someone can help me out!

P.S. I'm using the Server version of JIRA.

Regards,
Robin

1 answer

1 accepted

0 votes
Thomas Schlegel Community Champion Jan 16, 2018

Hi Robin, 

let's narrow the problem and remove the left part of the AND. This works for me:

issueFunction in subtasksOf("project = DI and Team = 162 and status = 'New'")

Does something like that filter your issues the right way?

If so, add the left part of the OR to your query.

I think, the part "Project = DI AND" is not necessary.

Hi @Thomas Schlegel,

Thanks for your quick response!

 

I've already tried this JQL and it worked for one status but I want to have a selection of statuses (like, New - In Refinement - Ready for Poker - Ready for Sprint). 

Currently I use this query to have the right results returned, but I'm curious if I can make the query more simple. 

project = "Digital Integration " AND issueFunction in subtasksOf("project = DI and Team = 162 and status = 'New'") OR issueFunction in subtasksOf("project = DI and Team = 162 and status = 'In Refinement'") OR issueFunction in subtasksOf("project = DI and Team = 162 and status = 'Ready for Poker'") OR issueFunction in subtasksOf("project = DI and Team = 162 and status = 'Ready for Sprint'") ORDER BY Rank ASC

 

By changing status = in status in () between the parentheses  doesn't seem to work... 

 

Regards,

Robin

Thomas Schlegel Community Champion Jan 17, 2018

Hi Robin, 

status in (... ) should work. Here's my JQL (with data from one of our projects) :

project = xxx AND issueFunction in subtasksOf("project = xxx  and component = yyy and status in ('Vorfall gemeldet', 'In Prüfung')")

This works perfectly in our environment (Jira 7.6.0, Scriptrunner 5.2.2).

Hi @Thomas Schlegel,

 

This worked for me as well. Thanks for your assistence!

 

Regards,

Robin

Thomas Schlegel Community Champion Jan 19, 2018

You're welcome, @Robin Klein

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,759 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot