Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,863
Community Members
 
Community Events
185
Community Groups

Using Customer Request Type in Behaviour

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.  

3 answers

1 accepted

Hi this suggestion worked for me if (getRequestTypeName() == 'IT Help')

hope this helps!

Mazen

David Harkins
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Sep 06, 2022

@Mazen AKIKI _Infosysta_ 

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

Like Dave Liao likes this
Dave Liao
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 10, 2023

@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

}

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.

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. 

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events