Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Set destination issue custom field value with Automation Issue Linked trigger

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!

1 answer

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:

edit issue.pngCustomfield_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.

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.

I didn't branch for this one. It looked like this:

2020-03-11_17-13-21.jpg

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, ", "))}}

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.

 

issue_linked_edit_rule.png

Like Chris likes this

Thanks Max!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

New Cloud Apps Roundup - Spring 2021

Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...

179 views 3 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you