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

1 vote
Answer accepted
Tim Martin 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 Leaders.
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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events