Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

About validation against custom fields for label attributes

青山 明 October 4, 2022

I want to validate field values during transitions in jira service management workflows. Field value validation uses regular expression checking. However, it seems that validation cannot be set for custom fields with label attributes. Is it not possible to set it? If not possible, is there any other way if I want to validate custom field value for label attribute?

1 answer

1 accepted

1 vote
Answer accepted
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.
October 4, 2022

Labels are not simple strings, they're effectively handled as options - that is the data in the database for them is not a string, but an identifier for an object that has a display/search name (the label the users have entered).  The regex validator is looking at the object, not the name of it when you apply it to labels.

You'll need to write code to do validation of labels.

青山 明 October 4, 2022

In conclusion, is it not possible to check the value of a custom field in the label attribute in the optional validation of the workflow?

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.
October 4, 2022

Not with the validator you are using, you'll need to find or write something that can work with labels.

青山 明 October 4, 2022

I am asking whether it is possible to check the input value to the label attribute custom field. How is it?

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.
October 4, 2022

Yes it is, as I said before.

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