I am having some trouble with automation rules.
This is the scenario that is happening:
Expected outcome:
2 actual outcomes (depending on rule setup):
I have tried to setup the rule to copy the field value from the destination ticket and from the trigger ticket, this did not work. I have also used the function {{destinationIssue.customfield_123}}, this also did not work.
Is this maybe a Jira limitation?
Hi Danilo,
Can you share the actual automation rule with us?
Hi John, this is the original setup. This setup produced the 1st outcome that I mentioned.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing. So what do you mean by it didn't work? It said successful but didn't copy the value?
Is there a specific link type that your users should selecting? Or literally any can be used? What was the specific link you used in your test?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any link can be used, I have tested with multiple link types.
When linking ticket A with ticket B (in the ticket A screen), the desired outcome is that the field value from ticket B is copied to the same field in ticket A.
The actual outcome is that the field value in ticket A is copied to the same field in ticket B. So basically the outcome is the reverse of the desired one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems like the link source vs destination is not the expected order when it comes through to the automation rule. Can you verify this by logging out `{{destinationIssue}}`?
The issue link trigger has a description on the context in which a link trigger executes:
Rule executes when an issue is linked to another issue. {{issue}} will always refer to the source issue, so if ISSUE-A is blocked by ISSUE-B, this rule will execute on ISSUE-B. To access ISSUE-A, use {{destinationIssue}}
It seems that the rule in question would be executing on issue B, copying over destination issue (A) field.
To fix this, what you can do is do a 'Related Issue Branch' component, and select 'Destination Issue' as the issue type.
Then, inside the branch, Edit Issue as you have done, but instead use `{{triggerissue.customfield_123}}`. I believe that should solve this problem for you.
Hope that helps
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
This solved the issue.
Here is the screenshot of how the rule is setup now.
Thank you everyone for the help, it is much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Danilo,
Glad it worked for you.
Just a note on the rule you have now, the branch type there being 'For linked issues' means it will execute the actions on all linked issues, not just the link that triggered the rule. If that's desired, then not a problem. For the case where you just want it purely for the link that triggered the rule, then the branch type of 'Destination Issue' would solve that problem
Cheers
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for jumping in @Sam Harding !!
@Danilo Simic - Glad it is working for you!
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.