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
Accepted answer
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 Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,672 views 18 21
Read article

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