Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21: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.
×I'm trying to write a JQL script that can return me all Stories with a specific Status AND return me ALL the associated Sub-Tasks linked to that story.
The ideal behavior is that I could run this query and it would return to me all the Stories that have a status of (let's say "In Progress") and would also allow me to click on the Story in the Sprint Board and see all the associated sub-tasks (regardless of their status)
Hi Blaine,
Sadly you cannot achieve the desired search using standard features on Jira, you must go for a third-party app instead. Using i.e. JQL Booster Pack if you are on Server / DataCenter, you can type the following:
1) Search all Stories with a specific Status (i.e. Open)
project = MyProject AND type = Story AND status = Open
2) Search for subtasks of "all Stories with a specific Status (i.e. Open)"
issue IN subtasksOf(' project = MyProject AND type = Story AND status = Open ')
3) All together <3
( project = MyProject AND type = Story AND status = Open ) OR ( issue IN subtasksOf(' project = MyProject AND type = Story AND status = Open ') )
(*) Note that this is just an example, you must tune above query to fit your needs.
Using this app you can also query other issues relations, check:
References:
Hi Blaine!
1. Make a filter with the jql
issuetype = Story AND Status = "in progress".
Save it and it will get an id and become for example "filter 12345"
2. Make a new jql
issueFunction in subtasksOf("filter=12345")
(You need scriptrunner for using this JQL, hopefully you have it).
now you want both stories AND subtasks so you will have to concatenate the two filters
issueFunction in subtasksOf("filter=12345") OR (issuetype = Story AND Status = "in progress")
But this is not enough, if you want to use it in a sprint board; you will have issues seeing the tickets because of the complexity of the filter.
An old trick is to put another piece in front of the JQL, making sure you're restricting the filter to only the project to which your scrum users have access
((Project = XYZ) AND (issueFunction in subtasksOf("filter=12345") OR (issuetype = Story AND Status = "in progress")))
That should do the job ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.