Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

Charlie Gavey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 15, 2021

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
AUG Leaders

Atlassian Community Events