Automatically Set the Assignee of an Issue in a Post Function


Use this post function script to automatically add a specific user as the assignee when a defined workflow transition occurs.


I work in support and when transitioning a workflow from 'in progress' to 'in review', I need my manager to be assigned to this issue so they can review it. This script automatically assigns this issue so I don't have to do this manually every time.


Jira Jira (7.7 - 8.6)

import com.atlassian.jira.component.ComponentAccessor // the username of the assignee final String userName = "user_name" def user = ComponentAccessor.userManager.getUserByName(userName) issue.setAssignee(user)
Discovered an issue? Report it here

Suggested for you

Appears in these Collections