Forums

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

Need a way to identify closed stories that moved through multiple sprints before completion.

Prasanna Subramaniam
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!
March 26, 2026
Is there a way to retrieve the list of stories that are already closed but had moved across multiple sprints before they were finally completed?

2 answers

1 vote
Gor Greyan
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 Champions.
March 26, 2026

Hi @Prasanna Subramaniam

Welcome to the Atlassian Community!

Adding, what @Marc -Devoteam- said.

That will also return those stories, which were only in one sprint.

If you need an exact stories, that was gone through multiple sprints.

You can add a number field in your stories, and run an automation with this smart value, which will write in that custom field the sprint count, through which the story is gone.

{{issue.sprint.size}}

Prasanna Subramaniam
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!
March 26, 2026

Dear @Gor Greyan , Is there a different option, I cannot create custom fields and smart values, just by JQL

 

Gor Greyan
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 Champions.
March 26, 2026

Dear @Prasanna Subramaniam

There is no native JQL, which I could find for sprint count, and ScriptRunner doesn't have any function that can return the sprint count for that issue.

Only my mentioned option, I think, can work. Keeping the sprint size in the custom field, then try to retrieve it via JQL, searching that custom field, which is greater than 1.

Prasanna Subramaniam
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!
March 26, 2026

Deae @Gor Greyan ,

 

Agreed. Instead of using a custom field, I’m trying to generate this value through a label. However, I’m not getting the expected output. I’m simply trying to append the sprint count with the prefix "SL_".

Example: A story that has spanned across 2 sprints should produce:

SL_2

But the output I’m currently getting is:

 

{{"SL_".concat{{issue.customfield_10020.size}}}}

Where am I going wrong?

 

Gor Greyan
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 Champions.
March 26, 2026

Dear @Prasanna Subramaniam

customfield_10020 is the number field, which you have created and kept there, the {{issue.sprint.size}}?

Prasanna Subramaniam
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!
March 26, 2026

Dear @Gor Greyan ,

customfield_10020 - is the field used for Sprint. Its a Alphanumeric filed

Gor Greyan
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 Champions.
March 26, 2026

Dear @Prasanna Subramaniam

You can just use this without a custom field. Just Edit work item and put the following JSON.

{
     "update": {
             "labels": [
{
"add": "SL_{{issue.sprint.size}}"
}
]
}
}

Screenshot 2026-03-26 162539.png

1 vote
Marc -Devoteam-
Community Champion
March 26, 2026

Hi @Prasanna Subramaniam 

Welcome to the community.

You cold use JQL:

type =story and status = closed and sprint in closedSprints()

This will get any stories in status closed and in relation to closed sprints.

The sprint field will show the sprints the story has been in.

Prasanna Subramaniam
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!
March 26, 2026

Dear @Marc -Devoteam- , Thanks for your response. 

 

My ask is slightly different. Using closedSprints() returns stories that were closed in past sprints. However, what I need is a way to identify stories that actually went through multiple iterations before getting completed.Example:
  1. Story A‑123 took 2 sprints to close
  2. Story A‑234 took 3 sprints to close
  3. Story A‑345 took 1 sprint to close

 

With the existing query, all three stories appear in the output. But my requirement is to fetch only the first two stories — i.e., stories that traversed more than one sprint before closure.

 

Marc -Devoteam-
Community Champion
March 26, 2026

Hi @Prasanna Subramaniam 

Then you have to create a custom field of type number, as suggested by @Gor Greyan 

Then create an automation when the sprint field is updated this number field updates from 0 to 1 and from 1 to 2 and so further any time the sprint value changes.

then you could a this field in your JQL statement.

Like Gor Greyan likes this

Suggest an answer

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

Atlassian Community Events