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

The best way to set a character limit on a custom field (no script required)

The best way i have found to set a character limit on a custom field is to add a regular expression check to the workflow transition.  This is much simpler than a groovy script.

 

Go to Project Setting > Workflows

Edit the workflow for the affected issue type

Switch to Diagram mode

On Create transition, click on the Validators

Choose Add Validator > Regular Expression Check

 

If you would like to restrict the field to a specific length:  enter [0-9]{n}$

 

(n) reflects your desired field length.

 

You just need to set this on the required workflow transition (ideally after the initial field input is required)

1 comment

Thanks for sharing this post James.  However natively, Jira Server does not include this specific validator type at this time.  I suspect that you were using a plugin with Jira, such as the Suite Utilities for Jira to get this functionality.   There are lots of other alternatives in addition to that specific add-on that can be found in Marketplace that can replicate this same kind of function in Jira.   For other users that come across this discuss, you could use that plugin to achieve this or I'd also recommend searching for 'validator' in the marketplace to find all sorts of alternative options.

Thanks,

Andy

Comment

Log in or Sign up to comment
Community showcase
Published Apr 09, 2019 in Portfolio for Jira

Portfolio for Jira 3.0 is here!

The wait is over... Portfolio for Jira Server and Data Center 3.0 is now officially here! Platform releases offer Atlassian an opportunity to shift our strategy, make bold predictions about t...

1,616 views 14 26
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