Hello community.
Today I am faced with such a problem. It is necessary to subtract the value of one custom field, customfield_10251, which is located in the linked task from the value of another custom field, customfield_10249, which is located in the parent task.
Field type is the same = Number Field
There are no errors when executing the automation rule, but the result is incorrect
{{#=}} {{issue.parent.fields.customfield_10249|0}} - {{issue.fields.customfield_10251|0}} {{/}}
value in field 10249 = 6 10251 = 3 (for example)
Perhaps someone can help me solve this problem
Hello @Razinov V.N.
Please show us the complete rule. What is the trigger of the rule?
Also please show us the output in the Audit Log for the rule's execution.
Lastly can you show us the issue details for an issue where this rule would be triggered, and point in that image to the issue you consider its parent?
I believe the problem is probably here:
{{#=}} {{issue.parent.fields.customfield_10249|0}} - {{issue.fields.customfield_10251|0}} {{/}}
You are trying to use {{issue}} to refer to two different issues, and that is not possible.
If that second value is in the issue that triggered the rule you need to instead use {{triggerIssue}}. And note that the "i" for "Issue" needs to be capitalized.
{{#=}} {{issue.parent.fields.customfield_10249|0}} - {{triggerIssue.fields.customfield_10251|0}} {{/}}
I changed the request a little and everything worked
{
"update": {
"customfield_10249": [
{
"set": {{#=}}{{issue.fields.customfield_10249|0}} - {{triggerIssue.fields.customfield_10251|0}}{{/}}
}
]
}
}
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.