The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Use RegEx to restrict data in Custom label field

Vishal Biyani
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 Champions.
January 19, 2021

I have created a custom Label field. If I want to restrict users to be able to add data that matches certain pattern, is that possible without going to any plugin?

e.g. Strings matching the pattern ABC-\d\d\d or DEF-\d\d\d\d\d\d should only be allowed in the custom label field.

I am using premium cloud version.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Mohamed Benziane
Community Champion
January 20, 2021

Hello @Vishal Biyani 

You can't restrict label field out of the box. A label field is made to allow users to put whatever data they want/need. You can try to use a customfield with restricted option instead.

 

Hope this helps

Vishal Biyani
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 Champions.
January 20, 2021

@Moh - i have created a custom field of type Label. Any suggestions how to restrict data in this field using RegEx?

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 Champions.
January 20, 2021

No, as that defeats the purpose of the label field.  Use a multi-select custom field instead, then you can completely control what people put in.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events