hi. my name is choi
recently i try to use scriptrunner plugn in. but as i'm a beginner, i have a problem
we use our own jira workflow and
from 1step to 2step, user need to select custom field( this is call "GRADE" and
it has "None","A","B")
----this is what i want---
if user select "None" and try to move next step button click
show message "Select One Please"
if user select "A" and try to move next step button click
show message "Please Check"
i was trying to make it like this
select workflow step > validator > add validator > script validator > using simple script
but i don't know this is right or not
please help me
I would advise to add a behaviour on the select list custom field and use this script :
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def selectList = getFieldById(getFieldChanged())
def selectListValue = selectList.getValue()
switch(selectListValue){
case null : selectList.setError("Please select a value"); break;
case "A" : selectList.clearError(); selectList.setHelpText("Please check"); break;
default: selectList.clearError(); break;
}
This way, if the user select :
Hope that helps.
it works!!!
thank you so much!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please mark the answer as accepted if you are satisfied with it so it can help other users too. :)
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.