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}}
Dear @Gor Greyan , Is there a different option, I cannot create custom fields and smart values, just by JQL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Prasanna Subramaniam
customfield_10020 is the number field, which you have created and kept there, the {{issue.sprint.size}}?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Gor Greyan ,
customfield_10020 - is the field used for Sprint. Its a Alphanumeric filed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}"
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Marc -Devoteam- , Thanks for your response.
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: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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.