Smart values: access an issue sprints

Raffaele Litto March 11, 2021

How can I access a list of an issue sprints with smart values?

Looking at Smart values I cannot find a reference to it 

2 answers

1 accepted

2 votes
Answer accepted
Bill Sheboy
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.
March 11, 2021

Hi @Raffaele Litto 

Have you tried {{issue.sprint}} yet?  That is a list of the sprints an issue has been assigned to and which have at least started.

Here is the documentation on the value to see what is available within it:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/#Smartvalues-general-{{Sprint}}

 

And here is information on working with list smart values:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/

Best regards,

Bill

Raffaele Litto March 12, 2021

so it exists? it wasn't documented. is it {{issue.sprint}} or {{issue.sprints}}?

I suppose that would work. But then finding if the sprint the issue is now is closed that would be a different matter. 
For the moment as a workaround I looked at the issue status, assuming that if all sprints are closed the issue is in a closed state (bit risky in some edge cases I know)

Bill Sheboy
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.
March 15, 2021

It is {{issue.sprint}}  singular.

For closure detection, you may check {{issue.sprint.state}} for "closed"

Or, you may use JQL: sprint IN closedSprints()

Like # people like this
Raffaele Litto March 15, 2021

Thanks!

0 votes
Ravi Sagar _Sparxsys_
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.
March 11, 2021

Hi @Raffaele Litto 

You can use the standard smart value to get the issue fields.

{{issue.fields.customfield_XXXXX}}

You can use this REST end point "JIRAURL/rest/api/latest/field" to find the Sprint field's customfield id.

I hope it helps.

Ravi

Suggest an answer

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

Atlassian Community Events