I have two questions Please!
1. I normally use ScriptRunner defaults scripts, but I need to make a field required based on a specific summary. I have tried the following script but it's not working. When transitioning to Done, set the "New ToLID" custom field if the issue summary field is as follows: "New ToLID assigned. The issue is a subtask. I am setting this in the Behaviours. Pls advise
if ("Done".equals(getActionName())) {
log.error("Behaviour start on screen Done issue")
def targetField = getFieldByName("New ToLID")
targetField.setRequired(false)
if (issue.getSummary().contains("New ToLID assigned"))
targetField.setRequired(true)
}
}
2. I tried to use the ScriptRunner Validator field required in the workflow, but when i get to the select field option it has no option see screenshot below, even those there are a bunch of custiom fields configured on the data center server. On the other hand, i can see the custome fields when using conditions, but when set it makes the transition button disappear. Please advise. Many Thanks in Advance
