Skip to content
Snippets Groups Projects
Commit 7133f049 authored by euko's avatar euko :palm_tree:
Browse files

Remove unused project reference

IterationReferenceFilter had a code path that attempts to
reference an iteration's project. The code path was
never used and is removed in this commit.

Although iterations may be presented within a project context,
they, as domain objects, cannot/do not belong to projects
(for historical context, project-level iterations have been
implemented but never rolled out as a feature.)

EE: true
parent 9fed5720
No related branches found
No related tags found
1 merge request!96528Remove unused project reference from IterationReferenceFilter
......@@ -24,7 +24,7 @@ def parent_records(parent, ids)
relation = [id_relation, iteration_relation].compact
return ::Iteration.none if relation.all?(::Iteration.none)
::Iteration.from_union(relation).includes(:project, :group, :iterations_cadence) # rubocop: disable CodeReuse/ActiveRecord
::Iteration.from_union(relation).includes(:group, :iterations_cadence) # rubocop: disable CodeReuse/ActiveRecord
end
def find_object(parent_object, id)
......@@ -124,14 +124,7 @@ def url_for_object(iteration, _parent)
end
def object_link_text(object, matches)
iteration_link = escape_once(super)
reference = object.project&.to_reference_base(project)
if reference.present?
"#{iteration_link} <i>in #{reference}</i>".html_safe
else
iteration_link
end
escape_once(super)
end
def object_link_title(_object, _matches)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment