OnPrem JIRA Ver 8.1.2
I am using a Cascading Select field that essentially has a list of values for apps in the first list followed by the actual work being done in the second field.
ex. JIRA / Upgrade
I have another field that is called JIRA Projects which lists all the Projects in our JIRA instance. It is only used when the request is a JIRA request. I want to hide that field if the Cascading Select field first selection, is anything but JIRA.
ex. ServiceNow / .... Then hide the JIRA Project field.
I am using Behaviors which works fine on other Projects and I tested with this Project/Screen and so on using another field that is not a Cascading Select List and it works fine.
So this issue appears to be that it's a Cascade Select List.
Here is my code...
Select "Application Request - Type of Work)
def ptpiField = getFieldByName("JIRA Project")
def ppField = getFieldById(getFieldChanged())
def selectedOption = ppField.getValue() as String
if ((selectedOption == "JIRA"))
{
ptpiField.setHidden(true)
}
else
{
ptpiField.setHidden(false)
}
Again... This works with a normal List of Values field just fine.
Do I need to add secondary values to get it to work? If so - what does that look like here?
if ((selectedOption == "JIRA"))
Any help is appreciated.
Hi @AndrewP
I'd update the if statement to check
selectedOption.contains("JIRA")
This way you don't need to worry about how the data from a cascading select field is presented.
Hope it helps
Kind regards
Jorden
Thanks - I set the following with no change.
def ptpiField = getFieldByName("JIRA Project")
def ppField = getFieldById(getFieldChanged())
def selectedOption = ppField.getValue() as String
if ((selectedOption in "Jira"))
{
ptpiField.setHidden(true)
}
else
{
ptpiField.setHidden(false)
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also - I am fine with defining the secondary field options - there are only 5 and it's likely I will have to know how to configure that anyhow. For example if the secondary field if "integration" then I need to show a multitude of integration fields which need to capture data at the Create moment.
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.