I am trying to set the assignee to a specific user for a handful of issue types. I have searched online and everything I've found so far doesn't want to work.
this is added as a Post Function Custom Script in the Create transition:
def issueType = event.issue.getIssueType().getName()
if ((issueType == "Copy / Cleanse & Upgrade Request") || (issueType == "VPN Request") || (issueType == "Document Image Options") || (issueType == "Server Access"))
{
issue.setAssignee('username')
on execution I get the following odd error:
2018-02-13 14:07:34,702 ERROR [workflow.ScriptWorkflowFunction]: ************************************************************************************* 2018-02-13 14:07:34,702 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: null, actionId: 1, file: <inline script> groovy.lang.MissingPropertyException: No such property: event for class: Script975 at Script975.run(Script975.groovy:1)
This is using Jira 7.6.1 and Scriptrunner 5.2.2
found the issue, I had grabbed part of this from a listener and forgot to take out the event portion.
First line should read:
def issueType = issue.getIssueType().getName()
then it all works fine of course.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.