Hi all
I figured out how to validate that custom fields do not contain certain values using Scriptrunner simple scripted validators on workflow transitions. Shown in the attached are two examples that I have working, the first for a text entry custom field (that has the same name as another field so I had to implement it using the custom field ID), and the second for a multi-select list.
My question is, can I implement these checks on issue edit (not create), rather than on a workflow transition? I think the right way to do this is using a Scriptrunner Behavior on the fields, but copy/pasting these scripts as behaviors does not work. Any suggestions please?
Thanks!
Actually, the error message is displayed, it's just displayed down the bottom of the Edit screen, instead of below the field being validated (shown with red arrow). And there's a colon displayed at the start of the error. Any ideas why???
Thanks.
I'm going to accept an answer above as I solved the original problem. I'll post a separate question about the error message location and formatting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well I've made good progress in that I got a Behavior working to the point that it will not allow me to save a change to an issue when a defined value is present in the custom field. The only issue I'm having is that the error message I've defined in .setError() is not being displayed on the screen at all. Any ideas please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.