Hello everyone,
I am stuck with a post function groovy script.
I want to set up the value of a custom field but when the user has a different language in his profile, it doesnt work.
I am working on a Data Center environment.
My field is used by JSM projects as well as JSW project.
My groovyscript is executed from a post function but it is stored in a file.
In a Switch/case statement, I have the following :
case ['010','070','799']:
issue.set {
setCustomFieldValue('Assigned Team', 'text1')
}
break
Anyone has an idea how to solve this?
Thank you :-)
It seems you are trying to use multiple case options to execute the code. This doesn't appear to be correct. Each case should have one option.
Please try modifying your code to an if/else condition instead, i.e. something like:-
def variable
issue.set {
if (variable in ['010', '070', '799']) {
setCustomFieldValue('Assigned Team', 'text1')
}
}
Please note that the sample code able is not 100% exact to your environment. Hence, you must make the required modifications.
Please give it a go and let me know how it goes.
Thank you and Kind regards,
Ram
Has your question been answered?
If yes, please accept the answer provided.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
x
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.