Forums

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

I wanted to add a validator to label field of Jira.

krunal gaoli December 28, 2021

Hi Team, 

My use case is that I wanted to add a validator to out of box label field so that user can  type only predefined labels. No free text should be allowed to it. 

 

How can we achive it.

 

Please suggest, 

Krunal. 

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 28, 2021

You cannot add validation to fields, validators only happen in workflows

"No free text should be allowed" - that would defeat the whole point of the label field.

If you don't want to allow free text in a label field, then there's a very simple way to achieve it - remove the label field from the project/issue and add a select or multi-select list instead.  You don't need to validate select lists, you have complete control of the options, and people can't enter free text into them.

krunal gaoli December 28, 2021

Yes, I understand that this will be a nice option but i will not be getting reports, and i wanted to use the default label field. 

Thank you Nic for quicker response 

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 28, 2021

Multi-select and select fields support the same searches and reporting that labels do, so that should not be a problem if you switch.

Suggest an answer

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

Atlassian Community Events