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.
Hi @Prem Is it possible to make for a custom field?
It looks like you're new here. Sign in or register to get started.