Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

IF/Else missing from JSM Automation branch

I am hoping I am missing something obvious here, but I created an automation that uses branching to perform actions on the newly created issue.

condition options.png

So I used the branch 'For most recently created issue'.  I need an If/Else block in order to add the logic necessary for the automation to work, but for some reason (oversight? design?) that option is not available on the branch (but is available when adding a top level component). 

 

Do I have any other options?

 

My algorithm is pretty simple, but the missing if/else is making this task a lot more difficult then it should be:

Read Queue via Web Request
If found item in Queue
               create a new issue, use values from body to populate fields
for most recently created issue
               # below line is where I have the problem
               map one of the body fields to the jira issue drop down values.  #example: if body.group = X then issue.group = A, else if body.group = Y then issue.group = B, etc.
               Send web request to delete item from the queue # Right now this is not in the branch, it is separate IF statement that runes the delete if {{createdIssueKey}}, but logically I should move it

 

The only workaround I can think of is to check body.group for each of the possible values and then create the issue and statically set issue.group.  This is not ideal as there are about 40 possible body.group values so I'd have to recreate the (almost) same create issue component that many times.

1 comment

Hi Lewis,

It might be simplest to use two separate automation rules to achieve this.

This thread discusses how to trigger a second rule with the results of a first rule:

https://community.atlassian.com/t5/Automation-questions/Trigger-a-second-rule-after-first-rule-completes/qaq-p/1851936

Hope that helps!

Cheers,

Charlie

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Jira Service Management

JSM Jira Automation: How to Send SLA Breached Notifications

Hi Everyone, In   this tutorial,  we will show you how you can monitor an SLA, and send notifications before or after the SLA has been breached.   SLA Threshold Trigger The SLA t...

611 views 5 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you