Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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
Hi @최성택 ,
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.
Hi @최성택 ,
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.
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.