Forums

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

What query to track multi sprint stories/work items?

Lori Nollet
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2025

Trying to figure out how to build a query for work items that span multiple sprints.

1 answer

1 accepted

3 votes
Answer accepted
Matt Parks
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.
April 9, 2025

Out of the box, I don't think Jira provides that functionality.

If you have Scriptrunner, you could create a scripted field that returns the number of sprints in a particular issue. The code is pretty simple.

 

import com.atlassian.jira.component.ComponentAccessor

import com.atlassian.jira.issue.fields.CustomField

CustomField sprintField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectsByName('Sprint').first() //grab the sprint field

def sprintList = issue.getCustomFieldValue(sprintField) //define the value

int total = 0 // declare total to 0

for (sprint in sprintList)

{

    total++

}

return total
Lori Nollet
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2025

Thank you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events