My project has a 3 custom fields:
start-date-time, end-date-time, elapsed time
Whenever the start-date-time or elapsed-time values change I want to recalculate and set the end-date-time value like:
end-date-time = startdate-time + elapsed-time
I am using Jira Automation and when the value changes for the elapsed-time custom field I tried to set the new end-date-time via:
{
"fields": {
"customfield_14201": "{{customfield_14200.addHours({{fieldChange.toString}})}}"
}
}
but I get the error:
Failed to get value for customfield_14200.addHours({{fieldChange.toString}})}}
Is there a way to do this with Automation rules?
Could you use smartvalue instead sending json data ?
Try using this into the end date time field.
{{issue.customfield_14200.plusHours(issue.customfield_XXX)}}
When XXX is the field id of elapse time field.
Regards
When I try just
{{issue.customfield_14200.addHours(5)}}
it just unsets the value. I think the interpreter does not understand the .addHours(5) syntax and just returns null or undefined.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry it's plusHours, not addHours
https://confluence.atlassian.com/automation/jira-smart-values-date-and-time-993924864.html
plusHours is for the cloud version.
Regards
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.