I'm using the below script in Scriptrunner and it's working just fine for most issues (using OutwardLinks). However, when the issue is linked FROM the status I want, it returns null. For example, issue A is blocked by issue B, and the "Linked Status" field shows the status of issue B as expected. But when issue B blocks issue A, the "Linked Status" field in issue A shows null.
Conversely, I can go to issue B, and the "Linked Status" field shows the status of issue A just fine. I've tried "InwardLinks", but that only shows the "Linked Status" field in issue A as it's own status. Any assistance would be appreciated. Thanks!
Issue A = DCMM-5838
Issue B = ITGOV-36
You'll need to get the Priority field value for the if-else condition. For example:
import com.atlassian.jira.issue.priority.Priority
import com.atlassian.jira.issue.IssueConstantImpl
def priority = getFieldById(getFieldChanged())
def selectedPriority = ((IssueConstantImpl) priority.getValue()).getName()
def justificacion = getFieldById("customfieldid_15801")
if (selectedPriority == "High") {
justificacion.setRequired(true)
}else {
justificacion.setRequired(false)
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.