Hi Atlassian community,
we are using Jira Assets and for one attribute we would like that only 3 characters can be used. This is a rule and if people are not doing this then we get problems in post processes.
I know there is a validation functionality for Jira Asset attributes for which one can use a "regular expression". I however never used this and I am not sure if and how the requirement of max 3 characters can be achieved with this.
My question therefore, do you know if with this regular expression we can define that max 3 characters (signs) shall be used? Or even better precisely 3 characters?
If yes, then I would appreciate an example.
Lastly, this is a text attribute.
Thanks for any kind of input!
Cheers,
Simon
Hi Simon,
I must admint I did use Google Gemini to show me this and it came back with:
Specific Format Validation:
^[A-Z]{3}-[0-9]{4}$
This regex matches a specific format, such as three uppercase letters followed by a hyphen and four numbers (e.g., ABC-1234).
So in your example, ^[A-Z]{3} will require 3 upper case characters.
I tried this and it appears to work, so I've learnt something as well.
Cheers
Mark
Hi @Mark Higgins
thanks for your extra effort and yes it works exactly as I wanted!
You must type in exactly three alphabetical characters with capital letters.
So my case is solved.
I just have one last question before closing this
What is this "expression language" for Asset attributes called? Like there must be some documentation on this somewhere, non?
Otherwise, I will just also use AI tools for the next case.
Thanks,
Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Simon,
Its actually an industry standard, called Regex.
If you google Regex, you will see where I found this.
Glad it worked.
Cheers
M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.