Forums

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

Automation to change Due Date using startOfWeek()

Daniel Avissar October 17, 2021

I'm trying to program an automation rule that is set to trigger when a ticket with a specific label is transitioned into a specific status (called "Ongoing" on my board), and it will then change the Due Date automatically to the start of the week in 2 weeks (i.e., using {{startOfWeek(2)}} to do this), and reduce priority. The attached screenshots shows how the automation rule is configured. 

Screen Shot 2021-10-17 at 13.38.56.png

According to the audit log, the rule succeeds when triggered. However, the Due Date field of the transitioned ticket is cleared. This means that no due date is displayed in the ticket's Due Date field (where, for example, it was set to today's date prior to the transition). Meanwhile, the Priority is indeed changed as expected.

Can somebody tell me if I am missing something, or if I happened on buggy behavior?

1 answer

1 accepted

6 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2021

Hi @Daniel Avissar and welcome to the community!

startOfWeek() function can be used only to JQL and not as a smart value. For your case there isn't a function for it. You could possibly however try to find a workaround. I'll try to help you, but I'll need some time :/

Daniel Avissar October 17, 2021

Thanks for the quick response @Alex Koxaras _Relational_! Good to know, I'll try to think of a workaround as well, and will update if I find something first. 

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2021

@Daniel Avissar try the following smart value within your edit field

{{issue.fields.dueDate.withNextDayOfWeek("MON").plusDays(7)}}

After testing it, this is what you want. :)

Let me know if that works for you.

Daniel Avissar October 17, 2021

Excellent! It works, although I modified it slightly because our work week begins on Sunday here. :) Thank you , @Alex Koxaras _Relational_

Like • Alex Koxaras _Relational_ likes this
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2021

@Daniel Avissar glad to know that it works out for you, and that you were able to change it to Sunday!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events