Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Limit entry length on summary

Guillaume Mackowiak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 1, 2021

Hello, 

I would like to avoid having a Summary field longer than 50 caracters.

Can this be achieved by a regex on automation rule?

Regards.

Guillaume.

 

3 answers

0 votes
Prem
Contributor
May 27, 2024

Hi @Guillaume Mackowiak 

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.

0 votes
Thorsten Letschert _Decadis AG_
Community Champion
May 3, 2021

Hi @Guillaume Mackowiak ,

What you're looking for is a (workflow) validator since automation won't help you here.

That said, head over to the workflow of interest and add the default 'Regular Expression Check' validator to a transition - probably the 'Create' one?

Cheers
Thorsten

0 votes
Vikrant Yadav
Community Champion
May 1, 2021

Hi @Guillaume Mackowiak  Try Regex validator it allow all charaters , limit should be 1-50:- 

^.{1,50}$

Explaination :- 

  • . dot stands for all characters. Except \n for which you will have to use s DOTALL flag.
Vikrant Yadav
Community Champion
May 1, 2021

@Guillaume Mackowiak  You can test Regex validator on :- https://regex101.com/

Like Darryl Lee likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events