What's the "right" way to determine the current request type form being used for the purpose of a dynamic behaviour?
For example, I have two Request Types that both have the same underlying Select List (Single) field on them, but I want to show different options in that field based on the Request Type being used.
Is this exposed somewhere easy to use? I was about to do something weird with trying to look at the URL and go by the ID number after "create/" in the URL but this seems bad.
Hi this suggestion worked for me if (getRequestTypeName() == 'IT Help')
hope this helps!
Mazen
Would you be able to provide an example of how you scripted this?
I am wanting to limit the Resolutions based on the Customer Request Type.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mazen AKIKI _Infosysta_ - this suggestion is the way to go! Thanks for posting this.
@David Harkins - answering your question for others who might be curious:
if (getRequestTypeName() == 'Request Type Form Name #1') {
your ScriptRunner logic here
}
if (getRequestTypeName() == 'Request Type Form Name #2') {
your ScriptRunner logic here
}
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.
Hey, Russell.
Did you ever find a way to do this in 1 script instead of having a script per request type? I'm trying to implement a similar setup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, the ugly workaround I've proceeded with for now was to define separate behaviours, each with its own unique initialiser, and simply map each request type to a different behaviour.
This yields the desired effect, albeit in a painful to maintain way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having a similar problem as well. Behaviours doesn't show the newly created Customer Request Type. I've already done a reindex and still it won't show the new Customer Request Types.
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.