Reviews should reference the top project that contains the violation
they reference, and not the module. It was not the case, and as a
consequence, the search engine did not work as expected.
root||self
end
+ def root_project
+ @root_project ||=
+ begin
+ parent_module(self)
+ end
+ end
+
def last_snapshot
@last_snapshot ||=
begin
end
chart_measures
end
+
+ def parent_module(current_module)
+ current_module.root ? parent_module(current_module.root) : current_module
+ end
+
end
def assign_project
if self.project.nil? && self.resource
- self.project=self.resource.project
+ self.project=self.resource.root_project
end
end