Forums

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

In Jira cloud how to validate a custom field value at runtime ?

Anurag Bharati July 18, 2025

In Jira cloud how can I validate a custom field value at runtime and stop user from giving incorrect value? I know about workflow validations but I cant wait till next state transition and want to stop user if he set incorrect value. Also what if user input incorrect values in the final state of workflow, I think it will be bad idea to add another state just to validate?

1 answer

2 votes
Shawn Doyle - ReleaseTEAM
Community Champion
July 18, 2025

Hi @Anurag Bharati 

My first approach would be to ask why this is a free form text field and not a select list.

If you can not change the field type, you could use Automation.  When the work item is modified check the field values against your correct values and update if needed.  This will require you to implement the logic, based on the level of complexity you intend to achieve.

Otherwise put guardrails around when this field is first filled in, add validators where it makes sense in the workflow and possibly remove the field from screens where you do not want the user to modify them.

There are a number of addons that can help with limiting the content of a text field, script runner comes to mind (one of the only addons I will name directly).

Lastly, have you tried talking with the users and finding out why they don't fill in the field correctly? Is this more of a training issue? When tools are shackled with safeguards for every bizarre edge case, they stop being sharp instruments and start being blunt headaches.

Anurag Bharati July 18, 2025

Hi @Shawn Doyle - ReleaseTEAM

Thank you, for replying!

To answer your question about why this is a free form text field and not a select list?
Because "Select List(single/multiple choices)" is also not much helpful. Since users work in very dynamic environment even though the listed values are valid but are not always good based on different conditions. These conditions are derived from business processes.
Example: List of allowed values for a custom field is -> Option-1, Option-2,...,Option-N. Now its fine for any selection while the work item is in new state, but in the following states I want the user selection to be validated and only good values should be saved. Lets say Option-1 is good but Option-2 is not good. Now how should I inform user that his selection of option is not good. And worst part is what if after the transition validation, again user selects a value which is not good, how should I support my users not making errors?
I feel the problem is absence of validations on update, scriptrunner is also not much helpful here and what surprises me most is that validation can be put on custom fields created via forge application but not on the custom fields that we create from the Jira cloud web settings!

We can not use forge app based custom fields because they will go away if application is removed!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events