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.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.