Filter search is not working for some saved Filters 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
Summary
Some saved Filters are not showing up when searching for them in Gadgets configurations screens, Boards configuration or the Filter search itself.
Environment
Any version of Jira Data Center (and Server).
Diagnosis
1. Filter permissions
The Filter is accessible to the logged user. If the Filter has restrictions to it, it may not show up in searches. You can confirm if you have access to the filter by fetching its Id from the DB:
select id, filtername, authorname, username, description, reqcontent
from searchrequest
where lower(filtername) like lower('%REPLACE_FILTER_NAME_HERE%');
And pasting the Filter's Id from the first column above to the URL, like:
https://jira-base-url/issues/?filter=99999
If the Filter's not accessible, it's expected it won't show up in searches by the same user.
2. Special characters in the Filter name
Other Filters are working and the Filters that aren't working have special characters in them, like the Underscore "_".
3. Filter is not found or works intermittently
In some cases, the permission is correct, but the filter is still not found.
Cause
1. Filter permissions
When a user doesn't have permission to a filter, the search will treat it as if the filter didn't exist for that user.
2. Special characters in the Filter name
Filters with Underscore in their names won't work well in Filter searches, as further explained in the Issue below:
- JRASERVER-67927Getting issue details... STATUS
Since version 8.0.0, Jira follows a Unicode standard annex UAX#29 with regards to word boundaries. As per the standard, the underscore character (_) is not considered as a word boundary, which results in the behaviour described by this issue.
3. Filter is not found or works intermittently
In most cases in which the permission is validated but the filter is still not found, the filter is missing from the index - either due to a re-index error or due to index replication error.
Solution
1. Filter permissions
Grant the user (or group) permission to the filter.
2. Special characters in the Filter name
The solution is to rename all Filters with Underscores in their names to use some other work separator, like space or hyphen.
To list all Filters with Underscore in their names we need this DB query:
select id, filtername, authorname, username, description, reqcontent
from searchrequest
where filtername like '%\_%';
It's best to rename them through Jira's own GUI, browsing each Filter by it's Id:
https://jira-base-url/issues/?filter=99999
An improvement to prevent Underscores being used in Filters names' tracked on:
- JRASERVER-74648Getting issue details... STATUS
3. Filter is not found or works intermittently
Run a full re-index.
If the problem persists, check if the re-index was successful and if there are errors in the logs when the re-index was running.
One specific bug that impacts filters is - JRASERVER-75184Getting issue details... STATUS