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

Robin Klein January 16, 2018

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

4 votes
Answer accepted
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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.

Robin Klein January 17, 2018

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

Like Corey Schulz likes this
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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).

Like # people like this
Robin Klein January 19, 2018

Hi @Thomas Schlegel,

 

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

 

Regards,

Robin

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 19, 2018

You're welcome, @Robin Klein

Suggest an answer

Log in or Sign up to answer