Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,724
Community Members
 
Community Events
184
Community Groups

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.

2 answers

1 accepted

2 votes
Answer accepted
Ignacio Pulgar
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.
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.

For anyone (like me) still looking for this functionality (please?) several years later, it's one of the things you can hack your way around with Jira Automation and smart values, which do support text field length comparisons. No plugins required. I talk about this workaround process for date comparisons as a answer to this question.

 

For example, I have a comment that runs when an action is performed include the following line:

{{#if(issue.Description.length.lte(400))}}*Description seems a little short*.{{/}}

The key here is that {{issue.Description.length}} is something you can access and work from within the automation, which you could set to trigger on an action or schedule to run against a query of issues.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events