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
Use this code
{
"update": {
"customfield_10249": [
{
"set": {{#=}}{{issue.fields.customfield_10249|0}} - {{triggerIssue.fields.customfield_10251|0}}{{/}}
}
]
}
}
When using automation rules to access linked issues, such as the parent of an issue, all of that parent's fields are not immediately available. There is some subset of the fields directly available for the parent, such as key, summary, status, etc. but not all custom fields.
The reason is one of scale and looping: pulling in all of the parent (or linked issues) fields, would then pull in all of their linked issues, and their fields, and so on. And as many links are bi-directional, this would also lead to loops.
When you want to access those other fields in the parent, the two options are to use a branch or Lookup Issues action with JQL to load the parent data. For your scenario, I recommend using lookup issues.
Kind regards,
Bill
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.