Hi People,
We have two fields Defect Classification and Function Classification in one screen,
So if I select "Hardware Error" as my Defect Classification, the custom field Function Classification should not appear on the screen. I have implemented this in behaviours with below script. But I am not getting the correct output, even if I choose "Hardware error" still I can see Function Classification. May I know why I am not getting correct output.
The script follows:
import static com.atlassian.jira.issue.IssueFieldConstants.*
import com.atlassian.jira.component.ComponentAccessor;
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours behaviours
def defectclassification = getFieldById("customfield_15663")
def functionclassification = getFieldById("customfield_16663")
if (defectclassification == "Hardware Error") {
functionclassification.setHidden(true)
}