Hello everyone
Actually I am trying to change my original estimate values based on custom field value Like if we have 10H in original estimate and we enter 50 in number field it will subtract the 50% from the original estimate then it become 5H when specific transit happen for that I bulid a post function in JMWE but it give error
{%- if issue.fields.customfield_10185 is defined and issue.fields.timeoriginalestimate is defined -%}
{%- set customFieldValue = issue.fields.customfield_10185.value %}
{%- set originalEstimate = issue.fields.timeoriginalestimate.value %}
{%- set percent = customFieldValue / 100 %}
{%- set newEstimateSeconds = originalEstimate - (originalEstimate * percent) %}
{%- set newEstimateHours = newEstimateSeconds / 3600 %}
{%- set update_params = {"timeoriginalestimate": {"value": newEstimateHours}}-%}
{{- issue.updateIssue(update_params) -}}
{%- endif -%}
Following is the error:
Message:
(string) [Line 7, Column 23]
Error: Unable to call `issue["updateIssue"]`, which is undefined or falsey