Can't set an assignee on Fast-track transition in Script Post-function

keram September 11, 2013

Hi,

In the script Post-Function I use Fast-track transition an issue.
In additonal code section I would like to set an assignee to the currentUser.
I use issueInputParameters.setAssigneeId - which was suggested by script runner, however it doesnt work.

I put the following code in additional code section:

import com.atlassian.jira.ComponentManager
def currentUser = componentManager.jiraAuthenticationContext?.user
issueInputParameters.setAssigneeId(currentUser)

thanks for help

1 answer

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 11, 2013

If you check your logs that will produce an error because it's not valid. Use this:

issueInputParameters.setAssigneeId(currentUser).name

But your code could be better because that doesn't check for current user being null.

Robert Poldervaart September 11, 2013

Jamie, do you mean?

issueInputParameters.setAssigneeId(currentUser.name)

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2013

yeah that's what i meant

Suggest an answer

Log in or Sign up to answer