I tried to assign ticket using following script, but doens't work. Is there anything wrong? Many Thanks!
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def requestCf = customFieldManager.getCustomFieldObjectByName("Customer Request Type")
def requestType = issue.getCustomFieldValue(requestCf) as String
if (requestType == "SD") {
issue.setAssigneeId("eyazici")
}
Hello,
try to change line
issue.setAssigneeId("eyazici")
with
def issueManager = ComponentAccessor.getIssueManager();
MutableIssue mutableIssue = issueManager.getIssueObject(issue.id) mutableIssue.setAssigneeId("eyazici")
mutableIssue.store();
and add following line to the imports
import com.atlassian.jira.issue.MutableIssue
Regards,
Milos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.