Remove the unreachable epic search result partial
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The EE search result partial ee/app/views/search/results/_epic.html.haml is
unreachable and can be removed.
Why it is unreachable
app/views/search/_results_list.html.haml:23-25 routes the epics scope to
search/results/work_item:
- elsif @scope === 'epics'
- @search_objects.each_with_index do |result, index|
= render partial: "search/results/work_item", locals: { result: result, index: index }No other view or helper renders search/results/epic. A repository-wide search
for results/epic outside the partial and its own spec returns nothing, and
git log -S'results/epic' -- app/views ee/app/views finds no view that ever
referenced it by that path: the epics branch has pointed at work_item since
23ccbd31be26, and dropped its should_show_work_items_as_epics_in_results?
condition in 67a3d6244a66.
Scope
- Remove
ee/app/views/search/results/_epic.html.haml. - Remove
ee/spec/views/search/results/_epic.html.haml_spec.rb, which exists only to guard the partial in case that routing is restored.
Before removing, confirm no path renders it through a computed partial name — the check above was on literal references.
Origin
Raised in review of !253076 (merged), where a reviewer asked whether the partial is meant to be removed and agreed removal was out of scope for that change.