I use the timeline feature in project boards to quickly move tickets to different 2 week sprints.
Sometimes tickets sit in old sprints that have completed, and they need to get moved to active sprints or future sprints. They need to move freely between the 3 states.
I want to set up an automation so that the start date and due date of an issue is automatically set to the currently assigned sprint.
However, in the rule building- there seems to be no easy way to pull the currently assigned sprint. I just returns a massive list of all the sprints that have ever been assigned. While I just need the latest.
{{#issue.fields.sprint}}{{startDate.jiraDate}}{{/}}
What can I do?
Hi @Kieran McShane -- Welcome to the Atlassian Community!
There are several ways to do this, depending upon when you want to do it:
Kind regards,
Bill
Thank you for the fast reply Bill!!
If there is some way to pull specifically the most recent and currently assigned sprint of a ticket, regardless of sprint state, I believe that would provide a solution. It will need to work if that ticket has a history of other sprints assigned to it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the additional information, @Kieran McShane
Is the sprint you want the most recent one by date? If so, you may use the max list function to get the dates, regardless of the sprint's state:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe that I solved this. Thank you for your attention.
I needed to account for assigning it to both active and future sprints. And account that it will not be able to move to a completed sprint, but from completed to active or future.
Start Date
{{#issue.sprint}}{{#if(or(equals(state,"active"), equals(state,"future")))}}{{startDate}}{{/}}{{/}}
Due Date
{{#issue.sprint}}{{#if(or(equals(state,"active"), equals(state,"future")))}}{{endDate}}{{/}}{{/}}
I found this log useful for error sourcing
Sprint Start Date: {{#issue.sprint}} {{#if(or(equals(state,"active"), equals(state,"future")))}} {{startDate}} {{/}} {{/}} Sprint End Date: {{#issue.sprint}} {{#if(or(equals(state,"active"), equals(state,"future")))}} {{endDate}} {{/}} {{/}}
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.