It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

query for text field length

Would it be possible to query for any issues where, say, description is empty OR has a length less than X?

We've discovered that in certain exceptional situations, users have bypassed required text fields by entering "." or "tbd" or something similar. Since the forcing function of a required field has introduced bad behavior, I'd like to instead create a filter to identify empty or incomplete fields so that I can reach out and prevent them from remaining in that state. 

Instance in question is self-hosted(aws), JIRA Software server 7.4.2.

1 answer

1 accepted

1 vote
Answer accepted
Ignacio Pulgar Community Leader Jan 02, 2018

Jira Query Language doesn't support that kind of text search natively.

However, ScriptRunner provides a search function that supports regular expressions, so maybe the following query returns all issues from FOO project with a description of less than 10 characters:

issueFunction in issueFieldMatch("project = FOO", "description", "^.{0,10}$")

Alternative methods at your disposal are:

  1. export the issues with the fields you would like to analyze to a CSV file and use external functions from a spreadsheet or text editor
  2. query JIRA API to get the desired issues with the fields of your interest and code a custom solution which iterates over the results
  3. query the database directly (which, generally speaking, this is a bad practice) and use a character length function provided by the underlying DBMS

Hope it helps.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Introducing new features for Jira Software Cloud's roadmap

Hi Atlassian community, A few months ago, we offered a sneak peak of the new hierarchy view on the roadmap. Thank you for all the feedback (and excitement) and for helping us shape the direction of...

22,881 views 101 74
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you