Is there a way that Script Runner can display a custom screen once a custom field is selected to a certain value?
ie: Custom Field 'Review' is set to Yes, from No.
Script Runner Behaviour will identify the change, and display this Screen, which is different from the Create , Edit , and View Screens.
Anyone know how to do this?
I have a script, below, which requires a comment. But the Edit screen that it is using contains a bunch of fields, and I want to limit the 'noise' if possible.
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
import com.atlassian.jira.issue.comments.CommentManager
@BaseScript FieldBehaviours fieldBehaviours
def regressionIssueField = getFieldById(getFieldChanged())
def regressedVersionField = getFieldById("comment")
String regressionIssueValue = regressionIssueField.getValue()
if (regressionIssueValue == "Yes") {
regressedVersionField.setRequired(true)
} else {
regressedVersionField.setRequired(false)
}