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

Smart value for not and equals operator not working

Team - I am trying to create an automation rule to print all sprint items however would like to ignore all issue types with status as "Cancelled" and "Invalid". Below is the query but it is not working. Any help would be greatly appreciated!

 

{{#lookupIssues}}
{{#if(not(equals(issue.status.name,"CANCELLED")))}}
{{issueType.name}} - <{{url}}|{{key}}> - _{{summary}}_ {{status.name}} is due on {{dueDate}}.
{{/}}
{{/}}

3 answers

1 accepted

4 votes
Answer accepted
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 17, 2023 • edited

Hi @Amit Bansal ,

please try status (or status.name) instead of issue.status.name in the condition.

See here for more info:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 17, 2023

Hi @Amit Bansal ,

I've just tested it and it works for me:

{{#lookupIssues}}
{{#if(not(equals(status.name,"New")))}}
{{status.name}}
{{/}}
{{/}}

The problem could be in the status name - CANCELLED is not the same as Cancelled. So if your status is called Cancelled (not CANCELLED), your condition won't work.

Maybe it will be the best to use status.id in the condition instead of name.

It worked. Thank you so much.

Hana - While I am trying to use "and" operator, it is giving me an error (row 2). Would be of big help if you know the fix.

 

{{#lookupIssues}}
{{#if(not(equals(and(status.name,"Cancelled"),(status.name,"Invalid"))))}}
{{issueType.name}} - <{{url}}|{{key}}> - _{{summary}}_ {{status.name}} is due on {{dueDate}}.
{{/}}
{{/}}

 

Thanks,

Amit

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 17, 2023

Hi @Amit Bansal ,

please try:

{{#if(and(not(equals(status.name,"Cancelled")),not(equals(status.name,"Invalid"))))}}
Like Bill Sheboy likes this

It worked...Thanks a ton.

Like Hana Kučerová likes this

Thanks Hana....Tried it too earlier but it also did not work.

Suggest an answer

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

Atlassian Community Events