Resolving JQL Anomalies Caused by user_key='unassigned' in the app_user Table

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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 a record exists in the app_user table with user_key='unassigned', it can result in anomalies during JQL searches.

Environment

8.20.13

Diagnosis

  1. When executing JQL searches using the term assignee = unassigned, unexpected results are returned, showing all unassigned issues.

  2. Checking the app_user table in the database reveals that the user_key for this user is set to 'unassigned', conflicting with Jira's internal constant.

Cause

Jira uses the internal constant "unassigned" to denote issues that have not been assigned to any user. If a user_key in the app_user table is also set to 'unassigned', it causes Jira's internal logic to malfunction, leading to unexpected behavior in JQL searches.

Solution

  1. ⚠️Backup: Always take a backup of the database before making any changes.

  2. Identify the Problematic User: In the app_user table, find the record with user_key='unassigned'.

    1 select * from app_user where user_key='unassigned'
  3. Update the User Key: Modify the user_key for this user to a different value that doesn't conflict with Jira's internal constant. For example, change it to 'unassigned-user'.

    1 update app_user set user_key='unassigned_old' where user_key='unassigned';
  4. Restart Jira: After making the database modification, restart the Jira node.

  5. Test: Execute the JQL search assignee = unassigned to confirm that only the actual unassigned issues are returned

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.