Forums

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

Due date number of days after custom field

parker_lachance
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!
March 11, 2020

Hello,

 

I am using Jira Automation to set a due date to be X days from the current date, where X is a value in a customfield [ExpectedDuration].

I've tried a few things including setting DueDate to {{now.plusBusinessDays({{ExpectedDuration.value}})}}, with no luck. Any idea how this is done?

1 answer

0 votes
Ajay _view26_
Community Champion
March 12, 2020

Hi @parker_lachance 

Just try by replacing the ExpectedDuration with the field ID 

Use the Rest API to get the ID of the custom field - 

https://{your Domain}.atlassian.net/rest/api/3/field

Example

{{now.plusBusinessDays({{issue.customfield_10225.value}})}}
parker_lachance
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!
March 12, 2020

Unfortunately, this did not work either.

From the API:

{"id":"customfield_10057","key":"customfield_10057","name":"ExpectedDuration","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10057]","ExpectedDuration"],"schema":{"type":"number","custom":"com.atlassian.jira.plugin.system.customfieldtypes:float","customId":10057}},

 

Code used:

{{now.plusBusinessDays({{issue.customfield_10057.value}})}}

 

Audit log error:

Error rendering smart-values when executing this rule:Failed to get value for now.plusBusinessDays({{issue.customfield_10057.value: {{now.plusBusinessDays({{issue.customfield_10057.value}})}}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events