Forums

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

How to query multi line text fields with an empty string as their value

Ralf Fahney July 13, 2020

Hi to all,

my filter 

project = PRJ AND "Multi Line Text Field" is EMPTY

shows issues that never had a value in the "Multi Line Text Field".

Once an issue had a value in the "Multi Line Text Field" but this value was removed completely, then the filter doesn't show this issue any more.

My assumption is that JIRA distinguishes between "Field has no value at all" and "Field has an empty string as its value". In the user interface, both cases are displayed similar. I can't distinguish them in the user interface.

So my question is:

How can I query those issues where the "Multi Line Text Field" has a value but this value is an empty string?

Thanks in advance & Kind regards

Ralf

2 answers

0 votes
Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2020

Probably you are having this issue https://jira.atlassian.com/browse/JRACLOUD-67435

Ralf Fahney July 13, 2020

Hi @Italo Qualisoni [e-Core] ,

thanks for your suggestion which I also found prior to asking my question. However, according to my current understanding https://jira.atlassian.com/browse/JRACLOUD-67435 doesn't address my issue. 

  • I can query issues having no value at all
  • But I can't query issues that have a value (is EMPTY doesn't return them) where this value is an empty string (neither '=' nor '~' operators compare to an empty string)

Cheers

Ralf

0 votes
Kristján Geir Mathiesen
Community Champion
July 13, 2020

Hi @Ralf Fahney 

You might want to try "is null":

project = PRJ AND "Multi Line Text Field" is null

HTH,
KGM

Ralf Fahney July 13, 2020

Hi @Kristján Geir Mathiesen

thanks for your suggestion which unfortunately still doesn't query the issues having an empty string as their value

  • There is a value so neither "is EMPTY" nor "is null" queries them
  • However this value is an empty string so I can't query it by the '=' or '~' operators

Cheers

Ralf

Kristján Geir Mathiesen
Community Champion
July 14, 2020

Ah dang it! Too bad that didn't work out. To be honest, these null or empty text searches often seem a bit shaky to me, personally. I mean, since we are not looking for a specific value, the results don't always seem like they should be. But I don't have scientific proof of that :) Just feel better when searching for a specific value in the db.

Speaking of db, have you looked at the values in that cf in the db and compared? From issues that the JQL returns vs. those the JQL should have returned.

Sorry I couldn't help. Please post your answer, when you find it, on here so the rest of us can learn :)

KGM

Ralf Fahney July 14, 2020

Hi @Kristján Geir Mathiesen,

we're working in the Atlassian Cloud. I don't have DB access ;)

And yes, should I find the answer, I'll post it

Cheers

Ralf

Like • Kristján Geir Mathiesen likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events