When a Jira project key is equal to a project name, the search always uses the key
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 project key matches a project name, and you enter it in a JQL query, it searches for the project that has that key, breaking existing filters.
This behavior is documented in the bug JRASERVER-35250 - Wrong filter result if project name duplicate with other project key
Solution
Example
Let's imagine we have 2 projects:
Project Name | Project Key |
---|---|
Kanban | K |
Kanban New | KANBAN |
When we use the JQL below to search, it will look for the "Kanban New" issues.
1
project="Kanban"
Solutions
Here are a few options to work around this issue. We'll use the names in the example to illustrate better.
1 - Change the "Kanban" project name
If you change the project name to something else, like "Kanban Original", you'd be able to search using the new name.
2 - Use the project ID in the search
When you go to the project details page, you can see the project ID in the end of the URL.
Instead of searching for project=Kanban you could use project=10123 if the ID was 10123.
3 - Delete the "Kanban New" project
Delete the "Kanban New" project and recreate it with a new project key.
4 - Change the product key and delete the old project key from the database
If the project can't be deleted to prevent data loss, this would be the alternative:
Change the project key in the project details page;
Delete the old project key from the database:
1
DELETE FROM project_key WHERE project_key='KANBAN'
Restart Jira
ℹ️ In Jira DC, a rolling restart will clear the necessary caches to apply this change
Was this helpful?