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}}.
{{/}}
{{/}}
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/
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.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Amit Bansal ,
please try:
{{#if(and(not(equals(status.name,"Cancelled")),not(equals(status.name,"Invalid"))))}}
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.
Thanks Hana....Tried it too earlier but it also did not work.
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.