Forums

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

Jira Check box

Sharadkumar Bangera
Contributor
November 12, 2019

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 Champion
November 12, 2019

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

Sharadkumar Bangera
Contributor
November 12, 2019

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

Leo
Community Champion
November 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)

0 votes
Andrew Laden
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.
November 13, 2019

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
AUG Leaders

Atlassian Community Events