I need to make a field SEO_Type of asset visible when the Label_BM filed is BM_SEO and invisible when the label is any other during the ticket creation.
I use the following script and it makes a field SEO_Type of asset invisible in any case:
const labelsBMField = getFieldById("customfield_12525");
const seoTypeOfAssetField = getFieldById("customfield_12702");
seoTypeOfAssetField.setVisible(true);
const labelsBMValue = labelsBMField.getValue()?.name;
if (labelsBMValue == 'BM_SEO') {
seoTypeOfAssetField.setVisible(true);
} else {
seoTypeOfAssetField.setVisible(false);
}
What is wrong?
