You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Say you want to set the value of one or more fields based on a lookup of other fields. (What does that even mean, Darryl?)
Well, let's say that you use Components to not only assign tickets to the Component Lead when a ticket is created, but you also need to designate an Executor per Component that will carry out the ticket after it is approved. You want the ticket assigned to the Executor automatically at that stage.
Or in a more complex example, you might have several "key" fields (Release, Phase, Build Area) that in various combinations map to "target" fields: primary and secondary approvers from Engineering and Build teams. Whenever one of the "key" fields changes, you'd want to update the approvers accordingly.
With on-prem Jira you could accomplish this ScriptRunner or Power Scripts, and if you use Automation, you could create a rule with multiple IF-ELSE blocks, or multiple rules for each variant.
But it would be even better to delegate management of these mappings to project owners (leads, managers, and so on) without having to edit a complex Automation Rule. Jira Admins would not have to handle those requests, and changes could be implemented faster.
If you create a separate project to hold your mappings, you can create a simple Automation that looks up the mapping based on your "key" fields, and can take actions based on "target" fields, like assigning to the looked-up values or updating the issue with the newly looked up values.
You'll need to set up a separate project to hold your mappings.
The steps are:
It's a good idea to make custom Screen and Field schemes in case you need to create other mappings restricted to different sets of users. You can simply create a new project that shares settings with the existing mapping project.
Here's a simple example and rule. The scenario is we're already assigning an issue to Component Lead for Review. When the issue moves to In Progress, the issue needs to be assigned to a user known as the "Executor".
Issues in the SAMLOOKUP project have just two fields: Components and Executor. (I have automated having the Summary being rewritten to "Executor - {{issue.component}}" whenever Component is updated, but it will overwrite any existing Summary and on creation we can't leave it empty. See Simple Notes.)
So the issues look like this:
When an issue’s status changes to In Progress we want to assign the issue to the "Executor" value which is looked up in an SAMLOOKUP issue based on the Component. Here's what that rule looks like:
Hence we have the additional check to make sure the transition happened in the New Bugs project. (Initially I set this up as a Global Rule but we lose a lot of efficiency doing that.)
Here's a more complex example.
For this case, we want to catch when any of the fields in blue change. So we need to trigger on a Field Change for the project in question.
But other than that, the logic is very similar to the Simple Example above, and equally as uh, simple.
Many thanks to @Matt Doar__ LinkedIn, @Boris Berenberg - Modus Create, @Mikael Sandberg, @Huw Evans, @Dave Liao, @Susan Hauth _Jira Queen_, and @Jack Brickey for their invaluable edits, suggestions, and encouragement.
Darryl Lee
Sr. Systems Engineer
Roku, Inc.
San Jose, CA
127 accepted answers
1 comment