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

0 vote
Ignacio Pulgar Community Champion 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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

551 views 6 12
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you