Copying a field value from one project to another upon transition of the issue using automation

Emily Ashley December 11, 2024

Hi all,

I have project A and Project B.  When a story in Project A transitions to status 'Committed' then I want to it go to the linked 'Initiative' in Project B, lookup the value from one of its custom fields and then copy that value back into a defined field in the story in Project A. I have started an automation rule for this but am struggling to complete it.  Any pointers would be really helpful.

 

Automation rule.jpg

1 answer

4 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2024

Hi @Emily Ashley 

The rule will not be able to do that with branching because the Edit Issue action acts upon the issue currently in context...and that would no longer be your trigger issue.

Instead you could use the Lookup Issues action with JQL to find the relevant Initiative for the trigger issue and then copy the field from there.  For example:

  • trigger: issue transitioned
  • condition: project equals your project A
  • condition: issue type equals Story
  • action: lookup issues to find the Initiative.  Your JQL will likely need to use the linkedIssues() function to find it relative to the Story.
  • smart values condition: to confirm the lookup found one-and-only-one issue
    • first value: {{lookupIssues.size}}
    • condition: equals
    • second value: 1
  • action: edit issue. selecting your field(s) from the looked up issue
    • {{lookupIssues.first.yourField}}

 

One more thing...your rule will need to use multiple-project scope in order to access the issue data in Project B.  Please ask your Jira Site Admin for help changing the rule scope as that is a global automation setting.

 

Kind regards,
Bill

Emily Ashley January 30, 2025

Hi Bill, thank you so much for your suggestion here, this has really helped. The piece I am now missing is that I cant understand where the automation brings back the value from project B to then populate it in project A?  Should there be something after the below step where the value that is being looked up from Project B and copied into Project A is pulled back?

  • smart values condition: to confirm the lookup found one-and-only-one issue
    • first value: {{lookupIssues.size}}
    • condition: equals
    • second value: 1

Many thanks for your help, Emily

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2025

Hi, Emily!

Please see my earlier post with the step after the condition to perform the edit.

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events