I am aware that it is possible to validate a custom field during a transition by means of a custom validator.
However, I could not find any way to validate the value of a custom field every time that its value is changed.
Is writing my own plugin the only solution?
As Nic implies this is happening because you are allowing users to directly edit field values. There's no out-of-the-box way to validate input other than simply 'requiring' the field via a Field Configuration.
Traditionally, JIRA is configured with workflow transitions and screens – This allows you to map input through a series of steps and actions, controlling data with a series of conditions, validators, and post-functions. Lately, the common configuration is simple workflow with full Edit permissions. With this configuration, you have little option to control data input.
Script Runner Behaviors, as Nic also suggests, allows you to perform client-side validation on transition screens. This is one possible solution.
Apart from the info in the two other good answers, my answer would be Yes.
Implement com.atlassian.jira.issue.customfields.CustomFieldType#validateFromParams, but it's not as useful as it could be, as you just get the raw string values.
I think what you are referring to is often known as "edit validators" - it exists in a few plugins. Implementations tend to rely on monkey-patching IssueService, which we are avoiding.
Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs