Issue symptoms
When trying to update an end user to an agent, I'm seeing this error: Error saving user: Reassign tickets assigned to this agent.
Conditions
Tickets can only be assigned to a user while they are an agent or administrator. Normally, downgrading that user to an end-user role would reassign those tickets. Sometimes this reassignment job gets interrupted, leaving end users with assigned tickets.
When upgrading an end user to an agent, the system attempts to set them as a light-agent or contributor role initially as that's the lowest permission level available. Once they're set at that lowest level, it's then possible to assign them a ticket-bearing role. It is this default role selection colliding with the end user being assigned tickets that leads to this error.
Resolution steps
There are a few different ways to resolve this issue:
Within the Support UI
To resolve this issue within the UI directly, do what the error indicates and reassign any non-closed tickets assigned to this user.
-
Search for
type:ticket assignee:"user@domain.com" status<closed< - Bulk edit tickets found by this search.
- If the user's currently assigned tickets should stay with that person, add a tag like user_reassigned_ticket to the user to make them easy to identify later
- Change the assignee on those tickets to be a current agent
- Once tickets have all been reassigned, upgrade the user
- Reassign tagged tickets from step 3 to your new agent if necessary
If your account has the "Change Role" button within People, this can be used to directly set the permissions to a ticket-bearing role as well

Using the API
If there are too many tickets to bulk reassign, it's also possible to leverage the Update user endpoint of the API to pass in a custom_role_id to directly set the user to a ticket bearing role. This would bypass the light agent/contributor role mentioned above which should avoid this issue.
For more information, see this article: Resources for managing users.
Comments
0 comments
Please sign in to leave a comment.