Issues icon appears in search results even if disabled; 404 when clicked
Summary
When a project with issues disabled is listed in search results, it still has an issues icon. Clicking on the issues icon results in a 404 error.
Steps to reproduce
- Have a project, e.g. https://gitlab.com/smcv/workaround-shadow-tactics
- Settings -> General -> Visibility, project features, permissions -> disable Issues
- Do a search that will find the project, e.g. https://gitlab.com/explore?sort=latest_activity_desc&utf8=%E2%9C%93&name=workaround-shadow-tactics&sort=latest_activity_desc
This happens a lot on Debian's Gitlab instance, where issues are disabled by default for newly-created projects (because Debian has a separate bug tracking system which maintainers are expected to monitor, and most maintainers prefer to get all their bugs and feature requests reported in one place). This was reported to the debian-devel mailing list.
Example Project
https://gitlab.com/smcv/workaround-shadow-tactics
What is the current bug behavior?
https://gitlab.com/explore?sort=latest_activity_desc&utf8=%E2%9C%93&name=workaround-shadow-tactics&sort=latest_activity_desc shows 4 number/icon pairs for Stars, Forks, Merge Requests, Issues. The Issues icon is a link to https://gitlab.com/smcv/workaround-shadow-tactics/-/issues which shows a 404 error.
What is the expected correct behavior?
I would have expected:
- No Issues icon for my project
- If other search results have Issues enabled, those other projects still get an Issues icon
An alternative that also seems reasonable, if Gitlab designers feel that inconsistency between rows in the search results would be more confusing:
- An Issues icon appears for my project indicating 0 issues
- Following the link goes to a page with a message "Issue tracking is not enabled for this project" or similar
Relevant logs and/or screenshots
Issues disabled:
Search shows an Issues icon:
Clicking on it leads to a 404:
Output of checks
This bug happens on GitLab.com