Searching for Projects by name does not work if Project Lead is not defined in JIRA
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
Problem
Searching for Projects by name does not work if no Project Lead is defined on a Project.
Diagnosis
Diagnostic Steps
- Look through the JIRA "All Projects" from Projects > View All Projects menu.
You may notice errors in your browser such as:
TypeError: item.lead is null
TypeError: Cannot read property 'toLowerCase' of null.
Try running the following query to identify projects without Project Leads:
SELECT * FROM project WHERE lead NOT IN (SELECT user_name FROM cwd_user WHERE active = 1);
Cause
The JavaScript is failing because there is a null entry being returned in the Project Search. JIRA Requires a Project lead to be set.
This can be caused by deleting users. We don't recommend deleting Users. Deactivating them is the recommended approach and deactivated users will not count towards your license.
See Deleting Users for more information on this. Often JIRA Administrators will deactivate a user, and rename the deactivated user to something that indicates they have left the organisation, for example: John Smith (Deactivated)
Also note: JIRA will also fail to return search results as if the Project Lead comes from a Disabled Directory:
-
JRA-43888Getting issue details...
STATUS
has further details of this behaviour.
Resolution
To add a project lead to a project, complete the following procedure:
- Log in as a System Administrator.
- Locate the Projects that do not have Project leads defined No Project Lead specificed.
- Goto: Administration > Projects.
- Locate Projects that do not have project leads defined.
- Open the Project.
- Select the Roles link.
- Set the Project Lead to a known user.
- Searching for the project should now work as expected.