Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello,
I would like to know if it's possible to update the date of the Due Date field, based on the date from one custom field + the numeric value found in a custom field.
In other words:
DateField1 = DateField2 + NumField3
(the NumField3 is actually a listbox with choice of 4 numbers. It is unclear if the value is considered string or numerical)
I tried using the smart value function .plusDay() as below but it does not work.
{{issue.CustomField_10088.plusDays(CustomField_10090)}}
Thank you all
Hi @Eric Bergeron ,
Welcome to Atlassian Community! Can you please try this one?
{{issue.CustomField_10088.plusDays(issue.CustomField_10090)}}
Hope that helps.
Hello @Yanty Ghani [ServiceRocket] ,
thank you for the (fast) welcome!
I had tried that one you suggested, but it's a no go.
Also attempted to use the math smart values in this fashion, without success (very wishful) :
{{#=}}{{issue.CustomField_10088}} + {{issue.CustomField_10090}}{{/}}
{{#=}}{{issue.CustomField_10088.days}} + {{issue.CustomField_10090}}{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried on mine and it works. Instead of using CustomField_10088 and CustomField_10090, can you use the actual field's name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did previously try the text name of the fields, no go.
Perhaps the issue comes from the fact that the NumField3 is a listbox.
I've just added/changed the issue description with the following:
(the NumField3 is actually a listbox with choice of 4 numbers. It is unclear if the value is considered string or numerical).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As your field is a single-select, perhaps try adding the value attribute.
{{issue.customfield_10088.plusDays(issue.customfield_10090.value)}}
If that does not work, also add .asNumber
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
Any dotAttribute does not work on my end. Not sure if these attributes need to be activated somewhere(?)
It does not work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Eric, when you note "it does not work", what are you observing?
The attributes should work out-of-the box. For a single-select field:
I just tried this with a custom, single-select field and it worked for me (with a different custom field id). Perhaps try writing this to the audit log and describe what happens.
{{issue.customfield_10088.plusDays(issue.customfield_10090.value.asNumber)}}
Also please note my correction to capitalization, as smart values are case-sensitive.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill,
Seems like I wasn't using both ".value" and ".asNumber" together, which is needed for the function .plusDay on a date field ( the customfield_10088).
customfield_10090 itself, gave out the right number selected;
customfield_10090.value also gave out the right number selected;
but then used in the .plusDays function, nothing was being printed into my test text field, and Audit Log was successful.
You're above line, with capitalization, worked!
Thank you @Bill Sheboy and @Yanty Ghani [ServiceRocket]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.