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 Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,711 views 17 21
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