how to auto set issue field value to the plus 3 working days from the creation date

Nicolas Andika
Contributor
August 19, 2024

Dear all, 

i am trying to add the post function set issue fields (JMWE app) to set the SLA Date (Date Time Custom Fields) with the created date +3 working days (Except Saturday and Sunday). Now im using the nunjuck expressions like this 

 

{{ issue.fields.created | date("add",3,"days") | date }}

but it still count the non working days,

how to make it possible to only set the SLA date +3 working days from the created date?

Thankyou

2 answers

2 accepted

2 votes
Answer accepted
Suprija Sirikonda _Appfire_
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.
August 19, 2024

Hi @Nicolas Andika,

Please note that you should use businessAdd for your requirement, which adds a specific number of days to a date, skipping non-business days (Saturday, Sunday). See the documentation of this here.

{{ issue.fields.created | date("businessAdd",3) | date }} 

Give it a try, and let me know if you've any questions on this.

BTW, I'm from Appfire, the vendor of JMWE.

 

-Suprija

Lead Product Support Engineer - Appfire

Nicolas Andika
Contributor
August 19, 2024

Hi @Suprija Sirikonda _Appfire_ 

Thanks a lot for the answer! it really helps 

Regards,

Nico

Like # people like this
0 votes
Answer accepted
Marc - Devoteam
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.
August 19, 2024

Hi @Nicolas Andika 

You can look at this example from the JWME documentation.

https://innovalog.atlassian.net/wiki/spaces/JMWEC/pages/3151429634/Add+days+to+a+date+excluding+specific+days. 

Or you could look at achieving this with an Automation rule.

Smart values are available for plus business days.

Nicolas Andika
Contributor
August 19, 2024

Hi @Marc - Devoteam 

Thankyou for the refference, i will look into it

Like Marc - Devoteam likes this

Suggest an answer

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

Atlassian Community Events