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

Still need help?

The Atlassian Community is here for you.

Ask the community

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 Feb 26, 2016

Was this helpful?

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