Smart values for current sprint

Dmitry Alabyan February 13, 2023

Hello community!
Does there exist a smart value for current sprint?
I want an automation that sets a due date for an issue transition to "in progress", which would be the same as End Date of the current sprint.
Works ok with {{sprint.endDate.jiraDate}} for issues that have appeared for the first times in the sprint.
Those though, that go from sprint to sprint and have +1, +2s to them in the sprint field - {{sprint.endDate.jiraDate}} triggers the end date of the initial sprint they appeared in, not the current one.

3 answers

1 accepted

0 votes
Answer accepted
Janice Castro July 12, 2023

Use the first/last function 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.first

Jira orders the sprint array starting with the first sprint, so you would use something like:

{{sprint.endDate.last.jiraDate}}

0 votes
David Foote March 18, 2024

If there are multiple sprints, last may not always get the one with the furthest out Due Date.

To get that, you can use max with sprint instead:

{{sprint.endDate.max.jiraDate}}

 

Janice Castro March 18, 2024

yes I did notice this behavior and found it quite odd! I haven't quite figured out why it wouldn't order the sprints consistently in the array

your suggestion of using max will only solve for the date but not the name of the latest sprint. it will work for the OPs situation of setting due dates though

0 votes
Magdalena Zhisheva
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.
February 13, 2023

Hi @Dmitry Alabyan ,

Can you send a screenshot of your current automation?

Dmitry Alabyan February 13, 2023

Sur

Screenshot 2023-02-13 at 21.01.37.png

Magdalena Zhisheva
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.
February 14, 2023

Hi @Dmitry Alabyan ,

I guess that the problem is because of the condition "Due date is empty" as if if the ticket was part of a previous sprint, then it already has a due date and the rule won't be applied.

Hope it helps!

Dmitry Alabyan February 14, 2023

@Magdalena Zhisheva sorry, it doesn't. Because that is a newly launched rule - and the error started to appear where the due dates haven't been set yet.

Magdalena Zhisheva
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.
February 14, 2023

Hi @Dmitry Alabyan ,

You may try something like this

Screenshot 2023-02-14 at 17.03.45.pngScreenshot 2023-02-14 at 17.04.35.png

Dmitry Alabyan February 22, 2023

@Magdalena Zhisheva no, that just is an alternative way of formulation the if condition.
What is  the point of concern - updting the Due Date field for the Action.
{{sprint.endDate.jiraDate}} does update it with the sprint end date. But if it is a current sprint - it works alright.
if it has been in several sprints already - shows the end date of the first sprint where it has been moved
Screenshot 2023-02-22 at 13.33.00.png

AMunshi May 25, 2023

I am also experience this issue for stories that have moved from one sprint to another.  Specifically if I close a sprint and allow jira to move the incomplete stories to the next sprint.

I small workaround is manually moving the stories to the next sprint prior to closing the current sprint.  But I don't like that because we lose the visual cue of the story being in multiple sprints to complete (ex. +4)

Suggest an answer

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

Atlassian Community Events