Making smart values work with +/- operator in the plusBusinessDays() function

Stefan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2024

I would like to use a smart value with the +/- operator in the plusBusinessDays() function for setting the due date of an issue.

So this works:

{{customfield_10015.plusBusinessDays(issue.Duration)}}

 

but when I try to use the +/- operator

{{customfield_10015.plusBusinessDays(issue.Duration+1) }}

the script runs through with setting the due date to NULL

any ideas?

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 @Stefan 

Welcome to community.

Correct syntax is:

{{customfield_10015.plusBusinessDays(issue.Duration.plus(1)) }}

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/#Plus-Minus

Hope it helps and accept answer if issue's resolved. Thanks!

Stefan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2024

Many thanks for the quick reply @Kalyan Sattaluri!

It works :)

Like Kalyan Sattaluri likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events