Forums

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

How would you search for issues in Jira that only contain spaces?

jlwelch2
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 30, 2024

There is an external process that interacts with fields in our Jira instance that has been adding a single space character to a certain custom field.  This has caused issues with reporting on this field that we need, so we have been looking for a way to search for the issues where this has happened in order to address it.  However, it seems that searching for spaces in Jira is not very straight forward and we have not been able to identify the fields uniquely in order to handle them.  Is there any way to produce a JQL query that will return only those issues with a space in a particular custom field?

Thank you,

Jeff

1 answer

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
May 31, 2024

Hi @jlwelch2

I just had a look on my own site, and it indeed seems like JQL is struggling with empty strings. I'm not a big JQL wizard myself, so perhaps someone else has an idea.

As a workaround, you could of course consider exporting your issues and performing some kind of post-processing, or perhaps use Jira Automation to detect the relevant issues and mark them somehow, e.g. by adding a label. Both isn't great though.

Alternatively, if you're open to solutions from the Atlassian Marketplace, you'll find options there; I'll add more information below.

Best,

Hannes

Hannes Obweger - JXL for Jira
Atlassian Partner
May 31, 2024

... and just to expand on the last point: If you're open to solutions from the Atlassian Marketplace, this should be trivial to solve using the app that my team and I are working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchiesissue grouping by any issue field(s), sum-ups, or conditional formatting - as well as the ability to filter issues via regular expressions

With regular-expression-based filtering, you can apply pretty much any logic, including the one that you are after:

regex-search-empty-string.gif

(BUS-1's Test: Single line field contains a single space character.)

The regex that I'm using is

^\s+$

which will match any string contains of at least one whitespace character and nothing else.

Once you've identified your issues, you can work on them directly in JXL (e.g., bulk edit them via copy/paste), or trigger various operations in Jira.

Any questions just let me know!

Suggest an answer

Log in or Sign up to answer