Getting the error "Can't assign to unknown user" when using the the "Assign issue" action in "Automation for Jira"

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

When using the Assign Issue action in Automation for Jira to set the assignee of an issue to a smart value using a text field (for example {{issue.summary}}), the automation rule will fail with the error "Can't assign to unknown user", even though a correct username was specified in the text field:

Environment

Any Jira version 8.4.0 an above, and any Automation for Jira version 7.x ad above.

Cause

The reason why the Assign Issue action fails is because:

  • This action was designed to assign users based on their user key, and not based on their user name. This limitation is tracked in the feature request  JIRAAUTOSERVER-85 - Getting issue details... STATUS .
  • In Jira, users are stored in 2 database tables:
    • the cwd_user table which contains the user's user name, full name, email address, etc...
    • the app_user table which contains the mapping between user keys and user names (the user key is basically used for any kind of user activity, role, etc...)
  • The Jira version 8.4.0 introduced a new way to store user's keys in the Jira Database, per the section Generating user keys in the documentation GDPR changes in JiraBecause of this change:

    • the key any new user created after the upgrade to Jira 8.4.0 will have the format JIRAUSERXXXXX and will not match the user name
    • the key of any user created before the upgrade will not be changed, and will match the user name

The only way to use this action successfully in the automation rule is to put the user's key in the text field that the smart value is pulling data from (for example JIRAUSERXXXXXX for recent users), instead of the user name.

Solution

Instead of using the Assign Issue action, use the Edit Issue action instead (since this action accepts both the user key and the user name value), as shown in the screenshot below:


Last modified on Feb 10, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.