Hi,
I have tried a number of combinations to get the following simple behaviour working. It should set the assignee if the value "CR" is selected in the field "Defect Category". Can anyone suggest why it is not working please...
def selectList = getFieldByName("Defect Category")
def assignee = getFieldByName("Assignee")
def selectListValue = selectList.getValue()
if (selectListValue == "CR") {
assignee.setFormValue("vi7081")
}
Regards
Peter Ellis
Hello @Peter Ellis
What scriprunner version do you use?
and try
def selectList = getFieldByName("Defect Category")
def assignee = getFieldById("assignee")
def selectListValue = selectList.getValue()
if (selectListValue == "CR") {
assignee.setFormValue("vi7081")
}
Hi Mark,
Thanks, that worked brilliantly! The version of ScriptRunner we have is 5.4.47. Is it just a case that system fields have to be accessed with getFieldByID ?
Many thanks again.
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep, all system fields must be accessed by id.
You re welcome :)
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.