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 use smart value dates to skip Fridays?

Deleted user
April 13, 2023

We're trying to auto-generate the due dates for our team at each step of our project processes.

However, our deploy dates can't ever be on a Friday. How would we tell the date logic to skip this day of the week?

My guess is that we'd have to use {{dayOfTheWeek}} in combination with a conditional statement in the Automation advanced field editing JSON area. Does anyone have any experience with this?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Tim Martin
Contributor
April 13, 2023

Are you also skipping the weekend?

Eg, you simply want: Due Date = next Monday-Thursday after Deploy Date

Probably a few ways to do it, but try something like this: 

Screenshot 2023-04-14 133408.png

Then, if true:

Screenshot 2023-04-14 133542.png

And if false:

Screenshot 2023-04-14 133604.png

Deleted user
April 19, 2023

Thanks Tim!

Your answer sent me in the right direction, and now I'm using

  • if/else conditionals to compare the format("EEE") to Fri
  • and then adding an extra day if it's equal
  • else using the regular date calculation.

It's working beautifully! Thank you!

 

Screenshot 2023-04-19 at 12.25.27 PM.png

1 vote
Najm Polaris
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 Champions.
April 13, 2023

Hi @[deleted]

What is the current logic of assigning the deploy dates? 

Deleted user
April 13, 2023

Thanks for your question! It's pretty simple right now, we're just adding 1 regular day (as opposed to M-F business day) to the previous date field's value - at least, in most instances.

{{customfield_12432.plusDays(1).jiraDate}}

But now we need it to always skip Fridays.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events