Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL - Get all tasks that block any user stories in an open sprint

Jeroen Rijks August 7, 2023

I want a custom filter to return all Tasks that block a User Story, where both the Task and the User Story are in an open sprint.

This example is almost what I want, but I'm having to update the filter every time I start a new sprint, to manually set the keys of all user stories in my sprint.

 

project = "My Project " AND issuetype = Task AND Sprint IN openSprints() AND issueLinkType = "blocks" AND issueBlocks in ("TICKET-1", "TICKET-2", "TICKET-3")


I'd like the brackets to automatically contain all user stories in this project's open sprint.

 

 

3 answers

1 accepted

1 vote
Answer accepted
Laurie Sciutti
Community Champion
August 7, 2023

hello @Jeroen Rijks ~ do you use ScriptRunner?  If so you can use the following:

 

project = "My Project" AND issuetype = Task AND Sprint IN openSprints() AND issueFunction in linkedIssuesOf("issuetype = Story", "blocks")
Jeroen Rijks August 8, 2023

Thank you for the advice, I don't have any plugins, and knowing that plugins are needed for this kind of filter was very helpful!

Like Laurie Sciutti likes this
2 votes
Kristján Geir Mathiesen
Community Champion
August 7, 2023

Hi @Jeroen Rijks and welcome.

Jira out-of-the-box cannot dynamically do this, like you are wanting to. You need a 3rd party app, which will add new functions to JQL, to achieve this. Check out on Atlassian Marketplace - maybe Scriptrunner.

HTH,
KGM

Jeroen Rijks August 8, 2023

Thank you for the advice

0 votes
Charlotte Santos -Appfire-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 7, 2023

Hi @Jeroen Rijks 

I’m Charlotte, a support engineer at Appfire and I’m here to help you.

Unfortunately, using JQL of Jira, you’ll not be able to do it dynamically.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to find all Tasks that block a User Story, where both the Task and the User Story are in an open sprint:

issue in linkedIssuesOfQuery("project='My project' AND type=Story AND Sprint IN openSprints()", "is blocked by") AND type = Task AND Sprint IN openSprints()

Please contact our support if you have any other questions about this query.

We’ll be happy to help you!

Best regards,

Charlotte

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events