It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Hi,

I am working on Change management type in Jira

My requirement is 

1) When i select field "ABC" which is check box (YES/NO) mandatory .

Question , when i select YES, how the new text field should automatically  display to update the text/number and when i select NO , no action is needed

 

2 answers

1 vote
Leo Community Leader Nov 12, 2019 • edited

Hi @Sharadkumar Bangera,

You can use scriptrunner's Behaviour to hide/display 2nd field based on 1st field selection

below snippet may give you some idea

def field = getFieldByName("Field Name to hide/display")
def chkBox = getFieldByName('CheckBox Field Name')
def value = chkBox.getFormValue() as String
if(value == "Yes"){
field.setHidden(false) //Enabling field to enter value
}
else{
field.setHidden(true) //hide field if value is not Yes
}
 

 

BR,

Leo

Thanks, So i have to create a field first in jira  1) Field Name to hide/display 2)chekbox

Leo Community Leader Nov 12, 2019

Yeah, if you are not having already.

I meant ABC as a checkbox in my script --> for which you need to setup behavior with given code

 field should automatically  display to update the text/number  ---> is the 2nd field should show up on (ABC == Yes)

As suggested above, Scriptrunner will work. You can also look at Live FIelds functions in Powerscripts.

But if you want to avoid scripting, you can look at Extension for Service Desk

https://marketplace.atlassian.com/apps/1212161/extension-for-jira-service-desk?hosting=server&tab=overview

Which will allow some dynamic screen without having to use scripting.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you