Can limit the number of characters in the summary field in JIRA? We have ScriptRunner... I read somewhere it might be possible with Behaviors. We export to a separate reporting database and a long summary hosed an import.
Hi Stephanie,
It sounds like the reporting service needs to be updated to accept the data it is trying to intake, but I am a distant audience.
The code is stolen/modified from: https://community.atlassian.com/t5/Jira-questions/limit-character-on-custom-field/qaq-p/663064
def field = getFieldByName("summary")
if ((field?.value as String)?.length() > 70) {
field.setError("Length of the field should be less than 70 chars")
} else {
field.clearError()
}
(i) I did not test this.
(i) Chang the length (currently 70) and setError (currently the only sentence in quotes)
Here are some links to items that may help.
Cheers!
Hi @StephanieC
You can achieve this by following these steps:
1. Go to the workflow and add a validation on the "Create" transition.
2. Add a validation via "Script Runner".
3. Use the following script:
issue.summary.split(' ').length >= 1 && issue.summary.split(' ').length <= 10
(Modify the number of words as per your requirement).
4. Test the script and add it.
5. Define a custom error message to help users understand the error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.