Hi,
I created a trigger Issue Linked with type Depending.
Also I added an action Edit Issue.
I need to set custom field 1 value for the issue (issueA) that affects another issue with another custom field 2 value from the issue (issueB) that is depending on.
I set additional fields JSON as following:
{
"fields": {
"customfield_xxx": "{{destinationIssue.customfield_yyy.value}}"
}
}
But I got inverse result: the custom field 1 of issueB was set as custom field 2 of issueA.
When I try to change my JSON as
{
"fields": {
"{{destinationIssue.customfield_xxx.value}}": "{{issue.customfield_yyy.value}}"
}
}
I get error:
Additional fields contains invalid field(s) in 'update' or 'fields' section: {{destinationIssue.customfield_xxx.value}}.
Is there any way to implement this logic using JSON?
Thanks in advance!
I did something similar.
I initially worked it out in JSON under More Options but was able to simplify it.
When an issue is linked, copy a field value from the destination issue to the current issue.
I chose the field to set and then entered this into the value:
Customfield_10091 holds the value that I want to copy to the Change Number field on the current issue.
Hi KJ,
Thank you for your answer. But in my case I need to set the field of destination issue. I found the decision by adding "Branch rule/related issues" component in my automation rule. This allows to set destination issue fields values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What was your branch rule? When I use "destination" as the branch rule, I get two of the same issue back. both
Destination: {{destinationIssue}} Source: {{issue}} are the same thing.
Both {{destinationIssue.custom field}} and {{issue.Item custom field}}} are the same now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I didn't branch for this one. It looked like this:
The first Edit issue field is what I showed earlier.
{{destinationIssue.customfield_10091}}
The Edit under Else looked like this so we didn't overwrite an existing value:
{{issue.fields.Change Number.concat(destinationIssue.customfield_10091.leftPad(12, ", "))}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
I set the type of related issues as "Linked issues" in the Branch rule. In this case I can set destination issue custom fields values as for current issue. To access the trigger issue fields I used {{triggerIssue}} (see comments in the Branch rule component.
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.