Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I copy a field across two different projects - Using Automation in Jira 9?

kdickason
Contributor
September 12, 2022

I now have upgraded to Jira 9.1 with Automation.  (I also have ScriptRunner.)

When an issue on Project AAA if linked to an issue on Project BBB,  I want to copy the field B on Project BBB to the field A on Project AAA.  How do I do that in Automation?  Please be as specific as possible if you can help me -- I am new to Automation.

1 answer

1 accepted

0 votes
Answer accepted
Florian Bonniec
Community Champion
September 12, 2022

Hi @kdickason 

 

You can create a rule from automation for jira admin with

As rule details, in project select multiple project and select project A and B, then select

 Field Value updated as trigger, select field B

Then create a new action of type branch, in this action configure the link type to use

Then in the branch add an action that is update issue, select the field A, in the field A set the following value

{{triggerIssue.field A}}

 

Save and it should work.

You have to do it from the  automation global configuration as it involved multiple projects

 

Regards

kdickason
Contributor
September 13, 2022

This doesn't seem to work.  Here's what I have in precise wording:

1. You said:  As rule details, in project select multiple project and select project A and B - Me: Got this set, my two projects are selected

2. then select Field Value updated as trigger, select field B - Me:  I used the trigger "Field value changed"  and specified field b.  

3. Then create a new action of type branch, in this action configure the link type to use - Me:  I specified "Link issues" and "All link types" under Link types. 

4. Then in the branch add an action that is update issue, select the field A, in the field A set the following value  {{triggerIssue.field A}}    Me:  I selected "Edit Issue" (no Update issue option), then in Choose Fields to set, I selected field A and typed {{triggerIssue.field A}}

I published.  The Automation runs with success when I make a change to field b in issues linked between AAA and BBB .  But all I see in field A is  {{triggerIssue.field A}}   (no value displays just the {{triggerIssue.field A}} code.  Am I missing something in that field?

Florian Bonniec
Community Champion
September 13, 2022

Hi

 

Can you try {{triggerIssue.fcustomfield_XXXX}} with XXXX being the field ID

You can find the field ID by going into the customfield configuration, configure the customfield and there is the id in the url.

 

Cqn you also add a screenshot of the edit part of the automation ?

 

Regards 

kdickason
Contributor
September 14, 2022

Got it.

Suggest an answer

Log in or Sign up to answer