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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


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
Community Members
Community Events
Community Groups

ScriptRunner Behaviour get request Type

Hello everybody. 

I try to get Request Type value in behaviours using getRequestTypeName() function.  But the result is null. 

Anybody knows how get this value?  





2 answers

@Mauricio Rodriguez 
You have to get the string from rqtype.

That way it work for me in a behaviour

if (rqtype.toString())
rqtype = rqtype.toString().replace("(","").replace(")","")




0 votes
Charlie Misonne Community Leader May 27, 2022

Hi Mauricio,

Did you take a look at this documentation from the vendor already?

I'm not 100% sure it is related. Could you share some extra context about your goal? Where is the behavior running and can you share some extra code?

Hi Charlie. 

I need to hide some fields in Jira Screen depends of request type value. 

I find the following article but is not working.

However, the documentation you've given me indicates that it's not possible to get the value of the Request Type field using a script.

Following you could see the script I built. (Behaviours)


// Get request type value (Service Management / Service Desk)
def reqType = getRequestTypeName()

def issueTypeField = getFieldById(ISSUE_TYPE)
def summaryField = getFieldById(SUMMARY)

switch (reqType) {

case "Value1":
summaryField.setHelpText('Finalidad del Acceso')

case "value2":
summaryField.setHelpText('Denominación de la campaña')



Do you have any suggesitions? 

@Mauricio Rodriguez 

Did you manage to get something working for this?

I have a similar requirement, in that i need to restrict the selectable Resolutions depending on the Request Type.

Hi @Mauricio Rodriguez

The function getRequestTypeName() actually works only if has been called from the Initialiser part of the Behaviour. Not in a field script.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events