The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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
TAGS
AUG Leaders

Atlassian Community Events