Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cascading select list first value equal to

nobuaki iwata August 19, 2019

Cascading select list first value equal to

It doesn't work...

 

Jira Software 8.3.0

5.5.9.1-jira8

 

cfValues['customfield_500231424']?.get(null)?.value == 'YES'

 

error無題.png

 

How do I move a script?
I would appreciate it if you could let me know how to specify custom fields by ID.

1 answer

1 vote
Sreenivasaraju P
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.
August 19, 2019

Hi @nobuaki iwata ,

Type casting is failing. can you please refer below code.

 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
import com.opensymphony.workflow.InvalidInputException

def issue = issue as MutableIssue
def cf = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("CascadingSelect")
def cfValue = issue.getCustomFieldValue(cf) as HashMap

def parentOption = cfValue.values().getAt(0)?.value
def childOption = cfValue.values().getAt(1)?.value

 

refer

https://community.atlassian.com/t5/Jira-questions/How-to-check-the-second-value-of-a-cascading-select-list-in-a/qaq-p/759808

nobuaki iwata August 19, 2019

Thank you very much.
I'll check it.
Sorry for the trouble.

Suggest an answer

Log in or Sign up to answer