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).png image (9).png image (10).png

1 answer

1 accepted

4 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 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 Claspill likes this

Suggest an answer

Log in or Sign up to answer