For one issue type (Bug), I would like to set the default value of the Assignee Field to a user called "Unconfirmed". By this I mean that users can still edit the assignee field on the Create Screen, but the field default shows as Unconfirmed.
(I'm not interested in automatic assignment using Post Functions in this scenario)
For all other issue types, I would like to set the default value of the Assignee Field to "Automatic"
I'm attempting to accomplish this using ScriptRunner Behaviors, but can't get it to work properly. The code below is what I have currently. I have tried this as both an initialiser function as well as a serverside script for the Assignee field.
Any assistance is appreciated!
import com.atlassian.jira.component.ComponentAccessor
import static com.atlassian.jira.issue.IssueFieldConstants.*
if (getActionName() != "Create Issue") {
return
}
//Value of 1 = Bug Issue Type
if (getFieldById(ISSUE_TYPE).getFormValue() == 1)
{
getFieldById(ASSIGNEE).setFormValue("Unconfirmed")
}
else
{
getFieldById(ASSIGNEE).setFormValue("Automatic")
}