How can i update issue due date to sprint end date

Akhilesh Gulati February 4, 2019

I wanted to update all my tickets in jira to sprint end date.

Is there a mean that whenever a ticket is assigned a sprint automatically due date is also updated.

2 answers

4 votes
Mercedes Schmitt July 2, 2020

The post that the previous person linked is from 2017. Since then, JIRA added smart values with new Sprint values.

 

This is how I have it set up in my project - obviously you don't have to use the 'comment' if you don't want to.

  • Trigger is When: Value changes for 'Sprint' field.
  • If Sprint is not empty
  • Then Edit issue field due date to custom value of {{issue.Sprint.endDate.jiradate}}
  • And add comment to issue.

Its important that you format the endDate with 'jiraDate' because the SprintEndDate is stored in DateTime but the DueDate is stored as only a Date. If you do not fix the format to use jiradate is will break the automation.

Sprint End Date Automation.png

Jordan Richter November 2, 2021

Hi @Mercedes Schmitt 

 

I'm using your suggestion, but I'm running into the issue were it resets to the first sprint to be created in a given project as opposed to the current sprint. What am I doing wrong?

 

Thanks!

Jordan

Mercedes Schmitt November 3, 2021

Hey @Jordan Richter !

 

Two things come to mind:

1. Make sure your Sprints aren't missing "End Dates" - those can be managed through the backlog.
image.png

 

2. Another thing we noticed with this automation is that you have to "Start" the sprints for it to work correctly on setting the due date - I haven't been able to figure out why Jira requires that. So once you set the start & end dates click "start" on the sprint, then see if that fixes your automation.

 

----

This article helps with Sprint management and shows how to "Start" and edit the sprint if you haven't had a chance to work with them in Jira:
https://www.atlassian.com/agile/tutorials/sprints 

Jordan Richter November 3, 2021

Hi @Mercedes Schmitt

 

Thanks for your reply. Those were two things I messed with to test the automation initially with no luck. Not sure what I'm doing wrong.

 

Jordan

Jordan Richter November 3, 2021

@Mercedes Schmitt @Earl McCutcheon 

 

This appears to work only on the end date of the first sprint that a given issue was assigned to. If I put "Issue 01" into "Sprint 1" with a Sprint end date of Dec 1, for example, Automation will change the "Due date" on that issue to Dec 1. If "Issue 01" carries over to "Sprint 2" with an end date of Jan 1, the due date will be "changed" to Dec 1 no matter what the "Due date" is on "Issue 01." Another issue, that hasn't been a part of a former sprint, if in "Sprint 2" will show a due date of Jan 1.

 

Please let me know if that example makes sense or not.

Thanks

Jordan

Manohar Kurapati November 9, 2021

Hi @Jordan Richter , you may find the below thread helpful. As per the post try using {{issue.sprint.endDate.max}}

https://community.atlassian.com/t5/Jira-Software-questions/set-due-date-of-an-issue-based-on-the-sprint-end-date/qaq-p/1776130

Like Jordan Richter likes this
Brendan March 8, 2022

Thanks Mercedes that worked for me great! I needed to understand the correct data time stamp field {{issue.Sprint.endDate.jiradate}} vs {{issue.Sprint.endDate}} which others advised and didn't work!

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2019

Suggest an answer

Log in or Sign up to answer