"User Does not Exist" JQL Exception even when Providing Valid Users

Still need help?

The Atlassian Community is here for you.

Ask the community

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

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

Symptoms

  1. You perform a search in JQL providing a specific user but it tells that the user does not exist.
  2. If you append a space in the user name suffix, it works.
  3. It's possible to see the user at Administration -> User, Groups & Roles -> User Browser.
  4. You're using external Crowd integration.
  5. Anything appears in logs.

Cause

In a few upgrade/usage cases, due to unknown reasons, some spaces are inserted in the user name directly on the database. It makes the username unrecognized for the JIRA instance when performing searches.

Resolution

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

  1. Stop JIRA/Crowd.
  2. Perform the following in both databases.
  3. Run this SQL query to identify which users have invalid names:

    select * from cwd_user where length(user_name) != length(trim(user_name));

    For MSSQL use the following SQL query:

    select * from cwd_user where LEN(user_name) != LEN(RTRIM(LTRIM(user_name)));
  4. Replace the broken names (containing additional space) with the correct ones:

    update cwd_user set user_name='user' where user_name='user ';
    update cwd_membership set child_name='user', lower_child_name='user' where child_name='user  ';
  5. Start JIRA/Crowd and verify if the issue get fixed.
Last modified on Jan 9, 2025

Was this helpful?

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