Forums

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

Add Days dynamically from a custom Field Value

Antony Delgado
Contributor
December 28, 2022

Hello!

I have this scenario:

1. There are 3 custom fields when we create a ticket:

   a. Days to Prepare Delivery (numeric) = customfield_11111

   b. Legal Delivery Date (date) = customfield_22222

   c. Final Delivery Date (date) = customfield_33333

2. I need to set the Final Delivery Date as follow:

     Final Delivery Date = Legal Delivery Date + Days to Prepare Delivery

I used "Edit Issue" in Automation and set this in "Final Delivery Date" using plusDays:

{{issue.customfield_22222.plusDays({{issue.customfield_11111}})}}

but it didn't work, is this possible to do?

 

I tried to do like this:

Screenshot 2022-12-28 at 11.49.13.png

 

Then I tried to do using a variable (but same idea):

Screenshot 2022-12-28 at 11.50.32.png

 

Thanks in advance for all your feedback!

1 answer

0 votes
Antony Delgado
Contributor
December 28, 2022

UPDATE:

I could fix my issue, I will share my solution:

Although my customfield Days to Prepare Delivery is numeric, is necessary to format it before to set in Final Delivery Date custom field, (as 2nd screenshot):

Using ".asNumber" format:

{{issue.customfield_22222.plusDays(finalDate.asNumber)}}

And it works!

Suggest an answer

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

Atlassian Community Events