need a script to create a behavior

phalgun_reddy May 16, 2023

Hi 
I have a custom field environment(custom field_10044) which is a select list 
in which if we select prod in the list four of custom fields should be populated.
Change failure comments(custom field_10049)

change failure(custom field_10046)

defect leakage(custom field_10047)

defect leakage(custom field_10048)

if we select the rest in the environment(custom field_10044) the above 4 custom fields nothing should be populated.

need this behavior while creating an issue 

 

kindly help

1 answer

0 votes
phalgun_reddy May 17, 2023

// Insert the Jira UI modifications API script for the behaviour.

var environmentField = getFieldById('customfield_10044');
var defectleakagercacommentsField = getFieldById('customfield_10048');

logger.info('Value : '+ environmentField.getValue().name);

if(environmentField.getValue().name == 'Prod'){
defectleakagercacommentsField.setVisible(true);
logger.info('true');
} else {
defectleakagercacommentsField.setVisible(false);
logger.info('false');
}

 

i have written the script

The above script is working

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events