It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

How to create regex summary limit characters.

Hello again .

I want to create characters limiter on summary field in VIEW,EDIT,CREATE screens .

I have validator from jsu who can add regex on customField but that dont work , couse summary field is system Field .

my example :

User open Create screen > input summary field text = 1234 > char limit is 3 .

I need to create 2 features like :
a) dialog screen with information
b) when user do more than 3 char in summary he cannot create the issue .


2 comments

Hi Bartosz

You might be interested to know that the plugin ProForma is able to achieve this. Our question fields support maximum char limits. 

We also recently implemented Regex pattern matching for our Question fields. This allows for extremely powerful validation options.

You can read more on our blog

Hi Bartosz,

I think I can offer you a pretty simple solution and I'm sorry to hear that you don't seem to be able to fix this with JSU.

Looking at our app Jira Workflow Toolbox you could use the available Boolean validator with math, date-time or text-string terms in the Create transition with the following expression:

length(%{00000}) < 4
  • length() is one of the numerous functions available in JWT's expression parser simply counting the characters of a string and returning a number
  • %{00000} is the reference of the string value of the Summary field

Additionally, you can set various options on when to skip the validation (transition is triggered by another post function or bulk operation) and compose an error message to show to the user according to your needs.

In the system it will look like this:

bool.png

 

I hope this is a possible solution to your problem. If you have further questions just let me know.

Best, Max

Thanks Max , it works .

Happy to hear that Bartosz!

Let me add something as we only spoke about the initial creation of the issue. This won't fix the editing of the summary inline or editing screen. There are possibilities using the Behaviours module of ScriptRunner. So you could validate the data entered but this also comes with limitations. It doesn't work when issues are bulk-edited and you would lose the inline editing feature because the screen for editing would be brought up instead for Behaviours to function properly.
Another approach would be to use separate screens for viewing and editing the issue and remove the summary field from screen associated with the edit operation. Inline Editing would not be possible this way. You should then think about adding (and restricting maybe) a global transition and putting the summary on that screen.

So maybe start with the validation when creating the issues and see if you have to add something on top of that later.

Comment

Log in or Sign up to comment
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you