How to set Minimum Legth for Description & Maximum length for Summary.


Currently we have a requirement of reducing Summary field length to 100 chars from existing 256.

And Description field length should be greater than the summary field length.


Can you let me know how to achieve it....


Thanks in Advance.

1 answer

0 votes

You're going to need code to limit the summary field, although there are several approaches.

  • Change the "edit template" for the summary field so that it uses html code to limit the user to 100 characters.  Whilst this is relatively easy to do, it does mean changing core code in JIRA, which you then have to maintain during upgrades, and it's not supported by Atlassian.  It won't stop all attempts to use more than 100 characters either - you'll still be able to do it with automation/scripts and REST.  You may have to repeat changes for it in add-ons too, if they expose the summary to users in different ways
  • Write javascript to limit it - this avoids "code change" as above, but is very difficult as you have to avoid clashing with existing js code and inject it in many places, as there are several ways to edit the summary.  Again, it won't protect you from automation/scripts or REST calls.
  • Use the Behaviours functions in the Script Runner add-on to do it (technically, this is similar to the js idea above, but it's a lot easier than writing your own!)
  • Use validators.  These prevent users from progressing issues through the workflow if the data is incorrect.  The downside is that someone could edit a summary to make it too long, but they won't be able to progress with the issue workflows until they correct the summary.  You will need to find/write a validator to do this and install it as an add-on, but it is only a few lines of code (As usual, I'd do it with the Script Runner).  This trick is absolute - it completely blocks progress until the data is corrected.

    On the description part of the question - you could code for it as above, but it would be a nightmare.  I think Behaviours can do it, although I've not tried.  Again, a short validator would be the absolute approach - no progress unless summary.size <= description.size


Thanks. I will try these options.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,832 views 12 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot