I'm looking to create automation with if-else logic

Chuck Rohllf July 16, 2020

I'm looking to create automation that works when the Stage (it is a custom field) value changes.  When that value changes, the Status field will be updated appropriately.  So for example, if Stage is updated to Configured then the Status will transition to configured....OR if the Stage is updated to Assembling then the status will transition to assembling.  There are several other values....I'd prefer not to create a separate automation for each.  Does that make sense?

1 answer

1 accepted

0 votes
Answer accepted
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.
July 16, 2020

Hi @Chuck Rohllf -- Welcome to the Atlassian Community!

What have you tried so far, and can you post an image of your rule?  That will help the community provide input.

It sounds like what you are trying to do is:

  • Trigger: stage field value changes
  • Condition with if/else structure: if Stage is Configured
    • Action: transition to Configured
  • Else if Stage is Assembling
    • Action: transition to Assembling
  • Else if Stage is...
    • Action: ...
  • Else ( to catch any fall through)
    • Action: probably notify somehow of an error

Please note the nesting to ensure your actions are paired with their condition tests.

 

Best regards,

Bill

Chuck Rohllf July 16, 2020

Thanks for the fast response!  Here is a snapshot of part of the rule.....I'm not seeing the Else/If option - which is probably my issue:

 

Jira.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.
July 16, 2020

Hi!

You can find the If/Else looking under New Condition:

If Else Condition.PNG

 

Next thing, you may not need that branch For Current Issue.  That helps when you have a more complicated structure and/or need to iterate over a set of things.  For example, starting with the parent of an issue.

Chuck Rohllf July 17, 2020

Thank you!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events