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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

135 views 2 0
Join discussion

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