JIRA field content check

gil February 16, 2016

I want to be able to validate a JIRA field content.  For example, only if the entered value matches some other value, then JIRA allows to update that field.  Besides Behaviour plugin, is there other way/plugin that does this task?  Thanks.

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2016

The standard way to do that is use validators in the workflow - they can check the content of fields and prevent issues moving on if things are incorrect.  There's not many distributed with off-the-shelf JIRA, but loads of them in add-ons, and you can write your own with Script Runner

gil February 17, 2016

Thanks for the reply.  Now with workflow validation, it's after the fact, isn't it?  We want to be able to validate and accept / deny the change right at update time.

Can you provide an example on how to use Script Runner to do a real time check?  Thanks.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2016

Yes, validators kick in after the user clicks the button to go on through the transition, and return the user to the screen with an error message on why it's failed validation.  That is "accept/deny at update time".

You could do some horrid validation with javascript, but I'd recommend avoiding them for the sake of usability.  If you had a simple case such as a field for "continent" and a second for "city" and the user selects Europe and then you validate their selection of "New York" as invalid, it's a right mare to have a box pop up to tell me that's wrong immediately, it should be on commit.  By all means, blank out the selected city, remove invalid cities from the options, but don't interrupt the user with inline validation.

I'm not aware of any add-ons that would allow you to define your own rules other than Behaviours in Script Runner.  There are some which will do a lot of validations, but they're mostly for fixed cases (like date A after date B)

Suggest an answer

Log in or Sign up to answer