Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

Single select field in Jira

kayode.faith
Contributor
July 15, 2024

Hi all I have two single select fields.

Field A "Is color blue?"

  • Yes
  • No

if yes what shade of blue?

  • Light
  • Dark
  • I don't know

2nd field is hidden based and based on the selected answer of the first question, second question is shown.

if yes, then tell us what shade of blue.  I have this code working where the second question is freeform text, is this possible with two single select fields as it is not working for me.

 

if yes what shade of blue?

 

def requireCode = getFieldById(getFieldChanged())
def requireCodeValue = requireCode.getValue()

def codeLocation = getFieldByName("Duration of hold")

if ('Yes' in requireCodeValue) {
    codeLocation.setHidden(false)
    codeLocation.setRequired(true)
} else {
    codeLocation.setHidden(true)
    codeLocation.setRequired(false)
}
Thank you,
Kayode

1 answer

1 accepted

1 vote
Answer accepted
Shawn Doyle - ReleaseTEAM
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 15, 2024
kayode.faith
Contributor
July 16, 2024

Great and thank you Shawn.  That worked.   I would have preferred a pop up but your suggestion saved me a lot of time troubleshooting.

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events