Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Setting a date field with automation

Dan Foster May 6, 2024

I am working on a piece of automation that will set a custom date field when a ticket transitions to a certain status.

The automation would take a number field (Quoted Turnaround Time, in days), add that number of business days to todays date, and set the custom date field.

For example an issue transitioned today with a quoted turnaround time of 10 business days would say today (May 6), plus 10 business days = May 20th.

I've been trying different variations of this automation but can't get it to work

{{now.plusBusinessDays{{Quoted Turnaround}}}}

Any help would be greatly appreciated

1 answer

1 accepted

2 votes
Answer accepted
Kalyan Sattaluri
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.
May 6, 2024

Hello @Dan Foster 

Correct syntax is:

 {{now.plusBusinessDays(Quoted Turnaround)}}

provided "Quoted Turnaround" is the field name..

Please try and let us know. Accept answer if solution works. Thanks!

 

Dan Foster May 6, 2024

@Kalyan Sattaluri Thank you for your feedback, I tried that and unfortunately it did not work.  I tried replacing the custom field name of "Quoted Turnaround" instead with the "customfield_XXXX" and unfortunately that did not work either.

delivery.PNG

Kalyan Sattaluri
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.
May 6, 2024

Please add a log statement after your trigger (before your If condition) and log {{Quoted Turnaround}} ... (or the custom field value if you know) so we know the value we are using is correct..

Dan Foster May 7, 2024

Thanks again @Kalyan Sattaluri , I have added that to the audit loglog.PNG

 

Kalyan Sattaluri
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.
May 7, 2024

Hmm, is this a number field or a text field.. do you happen know?

Can you please try to log below so we explicitly convert it to number?

 {{now.plusBusinessDays(Quoted Turnaround.asNumber)}}

Dan Foster May 7, 2024

@Kalyan Sattaluri Great find!  The field was a text field, not a number field, I corrected to a number field and it's working now.  Thank you very much!

Like Kalyan Sattaluri likes this

Suggest an answer

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

Atlassian Community Events