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.
Hi,
Are there a way to use multiple if conditions inside one lookupissue block?
I want to have priority as a slack emoji so I tried this:
{{#lookupIssues}}
<{{url}}|{{key}}> {{#if (equals issue.priority.name, "P0 - Blocker")}}:p-blocker: {{/}}{{#if (equals issue.priority.name, "P1 - Critical")}}:p-critical:{{/}}{{#if (equals issue.priority.name, "P2 - Major")}} :p-major:{{/}}{{#if (equals issue.priority.name, "P3 - Minor")}}:p-minor:{{/}} {{assignee.displayName}}: {{summary}}
{{/}}
But it doesn't work, priority is missing in a message.
Are there any way to do this?
Hi @Andrii Mykhailytsia -- Welcome to the Atlassian Community!
I see two problems in your expression:
Perhaps try this one:
{{#lookupIssues}}
<{{url}}|{{key}}> {{#if(equals(priority.name,"P0 - Blocker"))}}:p-blocker: {{/}}{{#if(equals(priority.name,"P1 - Critical"))}}:p-critical:{{/}}{{#if(equals(priority.name,"P2 - Major"))}}:p-major:{{/}}{{#if(equals(priority.name,"P3 - Minor"))}}:p-minor:{{/}} {{assignee.displayName}}: {{summary}}
{{/}}
I may have adjusted your spacing, so please fix that as needed.
By the way...you might also try the new Lookup Table feature to do this without conditional logic: https://community.atlassian.com/t5/Automation-articles/New-Automation-action-Create-lookup-table/ba-p/2311333
Kind regards,
Bill
@Bill Sheboy it works, many thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Andrii Mykhailytsia welcome to the Community! YES, I have one Automation that takes the User submitted Impact and Urgency in JSM and transforms it into a Priority. It's checking 4 different Urgency values against 4 different Impact values. Granted some of the values are the same but it starts with IF... and then continues with 10 different ELSE IF statements. Support helped me out with it, but we got it to work. I would try it out in an Automation, there are even some KBs out there to help out. If you need assistance, I'd give Support a shout.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.