How to automatically assign to a ticket the start and end dates of the sprint to which it belongs ?

Aline Veyradier
Contributor
January 14, 2025

Hello,

I've searched in automation but I can't manage...

How can we automatically assign to a ticket the start and end dates of the sprint to which it belongs, in the fields "Start date" and "Due Date" ?

 

{{sprint.startDate}} => Start date

{{sprint.endDate}} => Due date

Thank you for your help !

Best regards

Aline

1 answer

0 votes
Marc - Devoteam
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.
January 14, 2025

Hi @Aline Veyradier 

See this automation. adjust the field to you field names

x.jpg

Aline Veyradier
Contributor
January 14, 2025

Thanks you for your answer, Marc, but it doesn't work  :

"Error when editing tickets
TSS-1 (duedate must be in “yyyy-MM-dd” format (duedate), Start date must be in “yyyy-MM-dd” format (customfield_10015))"

... a problem with the date format

Aline Veyradier
Contributor
January 14, 2025

The rule below works, but only when a sprint has been started.

 2025-01-14 17_57_01-Générateur de règles - Automatisation - Test sprints Swanly - Jira et 5 pages de.png

(hope you're fluent in french ;o) )

 

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.
January 14, 2025

Hi @Aline Veyradier 

Adding to the suggestions from Marc...

Please note an issue's Sprint field is a list of values.  Thus when an issue "carries over" as incomplete from a prior sprint, the field now contains at least 2 sprints.

Thus it will help to know when you want to set the Start Date and Due Date values, and what they should contain:

  • triggering the rule on the Sprint Started trigger will ensure they contain the values for the active sprint, as your rule shows
  • any other scenario requires parsing the values, such by filtering the values in the {{issue.sprint}} field or finding the maximum dates

 

For example, if the rule trigger was not Sprint Started, you could set the date values for the issues in the sprint using these expressions:

{{#issue.sprint}}{{#if(equals(state, "active"))}}{{startDate}}{{/}}{{/}}

{{#issue.sprint}}{{#if(equals(state, "active"))}}{{EndDate}}{{/}}{{/}}

Or, if you assume the needed sprint is always the one with the latest dates, these would work:

{{issue.sprint.startDate.max}}

{{issue.sprint.endDate.max}}

 

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events