Hi I wan't to add a validator to a transition. Users should not be allowed to pass transition (next status in workflow), unless customvalue field 'DeployedBy" has a value, and user should get a message saying "DeployedBy field must have a value'
I've tried adding validator on the transition
cfValues['DeployedBy'] != 'EMPTY' with errormessage "DeployedBy field must have a value"
Gives no result - pass through the transition even if deployedby is empty, or has a value - no errormsg
cfValues['DeployedBy'] == 'EMPTY' with errormessage "DeployedBy field must have a value"
Throws the errormessage every time, both when DeployedBy field is empty, or has a value
Any ideas ???
I feel like I should make a t-shirt saying: "What kind of field is it?"
But to check it has some value, you can just use:
cfValues['DeployedBy']
You don't need to compare with the empty string... if it's empty it will be null. Use built-in scripts -> Condition Tester, and asserts (see docs).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try something like this cfValues['DeployedBy'] == ''
you can check here for script runner validator sample codes
https://jamieechlin.atlassian.net/wiki/display/GRV/Validators
another way is you can use field required validator from JSU plugin(free)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.