Script Runner Version 6.56
We created a behavior to check for a valid fix delivery. We also have a sil validator checking for a valid delivery on each of our transitions.
We added the behavior to check for valid fix delivery to stop users in-between transitions updating the fix version back to an invalid Fix delivery.
If the user tries to update the Fix delivery field back to 6.x from the view screen it takes the user to the edit screen and throws an error "to select a valid Delivery". If I am transitioning to another state I would expect the sil validator I have on the transition to fire if the Fix delivery is Invalid, but the sil validator is not firing. So if I select a transition to move to the next state and I try to change to an invalid Delivery the Behavior script is firing(I know because the messages are different) instead of the validator that is on the transition. In the behavior we do have it checking the state and if the state is "In Progress" and fix Version contains a .x it will throw a message. So my question is why is the Behavior firing on the transition instead of the validator I have on the transition. My understanding is for script runner you would need to have a Behavior and a validator when validating a field value??
Behaviours are evaluated every time a screen dialog is open. That's true for Create screen, Edit screen or any transition screens.
Workflow Validators fire when you submit a transition form (or immediately if no screens are associated with the transition).
It's possible to use getActionName() in your behaviour to see if you are using a transition or not and perhaps bypass the validation then.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.