Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue running JQL with conditional smart value

Jeff Clay November 11, 2021

I'm trying to create an automation rule. The rule needs to check if either of two custom fields are empty and proceed if either field has a value.

Currently, my rule looks like this ->

  • When: Issue created
  • Issue Type equals
    • Employee Onboarding
  • And Issue matches JQL
    • {{not(or(issue.IT Services & Software.isEmpty, issue.IT Hardware (multi-select).isEmpty))}}
  • Then: Create a new
    • Epic
  • Branch
    • For most recently created issue
      • Issue fields condition:
        • contains any of
          • Desk phone
      • Then: Create a new
        • Task

 

Screenshot from 2021-11-11 14-34-50.png

 

When I try to run this, I get an error saying:

JQL condition
No subsequent actions were performed since JQL condition did not pass due to error running JQL:
Invalid JQL: true

 

 

How can I properly configure the logic of that JQL? It seems to me that since it returns "true" that the rule should proceed.

 

 

 

1 answer

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
November 11, 2021

Try using the same JQL syntax that you would use for JQL in the Search screen:

not ("IT Services & Software" is EMPTY or "IT Hardware" is EMPTY) 

Jeff Clay November 11, 2021

That resulted in: 

The following issues did not match the condition:
HR-26
This may be due to any of the following reasons:
the issue didn't match the specified JQL (most likely)
the chosen rule actor doesn't have permissions (or issue security level permissions) to view the issue
the issue was deleted or wasn't indexed by Jira yet (in rare circumstances)

We recommend using the 'Issue fields condition' for more consistent results.

Jeff Clay November 11, 2021

I think this is going to be the solution:

 

"IT Hardware (multi-select)[Select List (multiple choices)]" is not EMPTY OR "IT Services & Software[Select List (multiple choices)]" is not EMPTY

 

Thanks for the pointer

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events