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?
Thanks.
Community moderators have prevented the ability to post new 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(")","")
if(rqtype.toString().matches("Whatever"))
{
}
}
Hi Mauricio,
Did you take a look at this documentation from the vendor already? https://docs.adaptavist.com/sfj/request-types-with-behaviours-70320725.html
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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')
break
case "value2":
summaryField.setHelpText('Denominación de la campaña')
break
default:
break
}
Do you have any suggesitions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The function getRequestTypeName() actually works only if has been called from the Initialiser part of the Behaviour. Not in a field script.
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.