Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Set due date on subtask according to the day of the week

I would like to, once a task is created, automatically create a subtask with due date as two Fridays before the due date of the task.

I tried by using:



However, if the task is on 

Since if the due date is on Friday this might not work, I tried by using If/else but it doesn't seems working. 

Any clues on how can I make it please?

2 answers

1 vote
Alex Koxaras Community Leader Sep 23, 2022

Hi @Beatriz Rodriguez Sanz and welcome to the community,

You missed a space on your smart value:

{{issue.due date.withNextDayOfWeek("FRI").minusDays(14)}}
0 votes

Hi @Beatriz Rodriguez Sanz -- Welcome to the Atlassian Community!

To confirm your use case, are you saying always want the sub-task to have a due date of the Friday that is two weeks ago?

If so, would you please post an image of your rule with the if/else structure?  That may reveal what is happening as the function withNextDayOfWeek() works differently when on the tested day (i.e. Friday)...

Sets the date to the next matching day. If you're already on that day, then it will return the next week. You can use the following values: MON, TUE, WED, THU, FRI, SAT, SUN.

And so your if/else would need different numbers for minusDays()

Kind regards,

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events