Hi,
I am trying to make a Radio button field (Rejection Reason) un-hidden and required when the resolution 'Rejected' is chosen but it is not working. This script works when the reason field is a list but is not working for a radio button.
Can anyone advise what changes I need to make in order to have the script function with a radio button?
import com.atlassian.jira.issue.resolution.Resolution
def resolutionField = getFieldById("resolution")
def RejectionReason = getFieldByName("Rejection Reason")
def resolution = resolutionField.getValue() as Resolution
if (resolution.name == "Rejected") {
RejectionReason.setRequired(true)
RejectionReason.setHidden(false)
} else {
RejectionReason.setRequired(false)
RejectionReason.setHidden(true)
}