Hello experts, I have an automation problem that I need help with. On Create or Update, I would like to copy fields from a source issue to the trigger issue. The source issue and trigger issue are in the same Project, but different issuetypes.
Project = TPR
Issuetype = Unit and CBU
Issuetype Unit and CBU have something in common. Unit Issue Key is equal to a custom field in CBU.
Example: Issuetype Unit and CBU have a custom field called Code. In issuetype Unit, Code is populated. I would like to have issuetype CBU look this value up and write it to it's Code field.... Kind of syncing the data between Unit and CBU when CBU is created or updated.
Here is what I have now to maybe explain a little more;
When: Rule is triggered on
-Issue Created
-Issue Updated
For JQL
project=TPR AND issuetype = Unit AND key = {{issue.customfield_123.key}}
Then: Edit Issue fields
Code - Copy from trigger issue
Customfield_123 is only in CBU issuetype, so this will only be successful in that type.
Copy from trigger issue isn't right because I want it to copy from the JQL search and not the trigger issue (BTW, it will only yield 1 result because it is the key).
Is there a way to do this in Automation? I know I can do this in Scriptrunner, but I am trying to keep it kind of clean for future editors.