Hi!
I'm new here and also a new user of the Adaptavist Scriptrunner.
I'm trying to setup our create issue screen that when the 'Project Group' is Emergency, ticket priority will be set to High when the ticket gets created (Priority is not in the list that user needs to fill out).
I researched all over and came up with this. I am not sure where the problem may be because I'm not receiving any errors. **sorry if it looks bad, it's my first time to try this**
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.fields.PrioritySystemField
def ProjectGroup = getFieldById("customfield_14701")
def Priority = getFieldById("Priority")
if (ProjectGroup.getValue() == "Emergency") {
Priority.setFormValue("High")
}
else {
Priority.setFormValue("Medium")
}
I hope someone can help me. Thank you 