Forums

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

In advanced search how do I check for a text field having no text?

Eric Chamberlain March 6, 2023

I am trying to search for stories that have an empty "Acceptance Criteria" but nothing is working.  I have tried

  • "Acceptance Criteria" is EMPTY
  • "Acceptance Criteria" !~ "?"

I have done other tests to confirm that I have the right field by searching for a specific sub-text and seeing the results.  


Additional information:

If I try

"Acceptance Criteria" = "" 

I get the error

The operator '=' is not supported by the 'Acceptance Criteria' field.

3 answers

0 votes
Eric Chamberlain March 6, 2023

I am beginning to think that the behavior is a JIRA bug.   Otherwise, what does 

"Acceptance Criteria" is EMPTY 

mean?

0 votes
Kai Becker
Community Champion
March 6, 2023

Hi @Eric Chamberlain ,

for multiline text fields,

"Acceptance Criteria" is EMPTY

should do the trick. Just to be sure, are you using Jira cloud or an on prem version?

What type of field is "Acceptance Criteria"? 

Eric Chamberlain March 6, 2023

As stated in the question body, I have tried that expression and it does not filter as one would expect.

Ditte Simard
Community Champion
March 6, 2023

Do you get an error when you do:

Acceptance Criteria is EMPTY

Or are you getting results that you are not expecting?


Eric Chamberlain March 6, 2023

It is the latter.  I get results have various amounts of text in the field.  The search constraint seems to be ignored.

Eric Chamberlain March 6, 2023

To answer the question 

What type of field is "Acceptance Criteria"?

It is a multi-line text field.

0 votes
Ditte Simard
Community Champion
March 6, 2023

the "=" operator does not work with a text field.  You would have to use "CONTAINS" (which is the ~) :  https://support.atlassian.com/jira-service-management-cloud/docs/advanced-search-reference-jql-operators/#Advancedsearchingoperatorsreference-CONTAINS

Unfortunately there isn't a clean way to check if a text field is empty.  I would recommend that you check this article out as well:  https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-fields/#Text


Eric Chamberlain March 6, 2023

The "~" operator is a synonym for CONTAINS as documented in that link. I have tried it and it does not work.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events