The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add a formatted date to the sprint name in a sprint create automation?

Jenn Sherman
Contributor
June 6, 2024

I have an automation that runs every 2 weeks to create a sprint that starts 4 weeks from now so that the backlog always has 2 future sprints in it.  I want to put in the sprint name the start and end dates for the sprint.  So if the sprint starts on 7/1/2024 and ends on 7/14/2024, my sprint name would be "TeamA sprint 4 7/1-7/14".

I created smart value variables to calculate the sprint start and end dates and I use those variables in the "Send web request" action to create the sprint. The automation works to create the sprint but I can't figure out how to add the date to the sprint name field.

image (8).pngimage (9).pngimage (10).png

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

4 votes
Answer accepted
Trudy P Claspill
Community Champion
June 6, 2024

Hello @Jenn Sherman 

A variable is stored as text so your attempt to use the date format function on the variable is not going to work.

I recommend you use the same info you are using to set the variable - now.plusDays(14) - with the alternate format.

 

Jenn Sherman
Contributor
June 6, 2024

@Trudy P Claspill That worked! I had forgotten about the variable being text.  Doing it this way worked.  Thanks for the quick response!

{
"originBoardId": "287",
"goal": "",
"name": "YI-G Week {{now.plusDays(14).format("MM/dd")}}-{{now.plusDays(20).format("MM/dd")}} ",
"startDate": "{{now.plusDays(14).jiraDate}}",
"endDate": "{{now.plusDays(20).jiraDate}}"
}

Like Trudy P Claspill likes this
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events