How do I set up Automation/Post-function to assign based on custom field value(s)?

Kayleen Cucugliello December 12, 2023

I'm looking to assign an issue based on a custom field value.

Example:

WHEN The issue transitions from THIS to THIS,

AND If the *food* is an *apple*,

THEN assign the issue to THIS PERSON

(Items in ** are custom fields)

 

1 answer

1 vote
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 12, 2023

Hi @Kayleen Cucugliello 

You seem to have a good outline to create your automation rule.  I recommend building it, testing, and if you run into challenges, post images of your rule and audit log details, describing what is not working as you expect, and the community can help.

To get you started on creating your rule, please refer to these documentation and example sources:

Kind regards,
Bill

Kayleen Cucugliello December 12, 2023

Thanks for the reply, Bill.

The issue is that there are multiple inputs for each custom field. So, in automation, it stops at the first function.

See the picture -image.png It says no actions performed. But, it only checked the first 'if' function.

I need it to keep checking until it meets the true condition. 

 

I know that I can split it out and have individual rules for each, but I feel like there has to be a way around that amount of individual rules. 

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 12, 2023

There are couple of ways to handle that:

  1. if your cases are related and mutually exclusive (e.g., "yes" or "no") then use an if / else condition structure
  2. if your cases are independent (e.g. when "blue" do this, next when "apple" do that), use branching

 

For example of case #1:

  • if / else condition:
    • condition: if Field 1 equals "yes"
      • action: do something
    • else / if Field 1 equals "no"
      • action: do a different thing
    • else (handle the case of the field not set, when possible)
      • action: do yet something different
  • ...more rule steps

 

An example of case #2 might be:

  • some rule steps...
  • branch: on current issue
    • condition: if Field 2 is "blue"
    • action: do something
  • branch: on current issue
    • condition: if Field 3 is "apple"
    • action: do something different
  • ...more rule steps
Kayleen Cucugliello December 12, 2023

Thanks Bill!

Do I have to create a new branch for each option? Or do I continue to add components under the 1 branch?

image.png

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 12, 2023

You will need a branch for each one. 

When the rule uses this structure, each branch runs the code inside independently.  As you are checking different custom fields to assign the issue, they need to be separated.

Please note: there is a maximum of 65 steps (i.e., components) in a rule.  If your case will require more than 21 conditions, let's investigate other solution approaches.

1 trigger + ( 1 branch + 1 condition + 1 action to assign ) x 21 = 64 steps

Like Kayleen Cucugliello likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events