Skip to content

Fix loading of events

André Hänsel requested to merge (removed):fix-missing-project-events into master

What does this MR do?

The EventCollection can load events from the database, for example for the activity log or the RSS feed. It can take an ActiveRecord::Relation of projects to restrict loading of events to those projects. If this Relation contained a limit clause, the query returned wrong results.

This change removes any limit clause from the project Relation before using it to filter events.

Fixes #51596 (moved) Fixes #64346 (moved)

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

The same query (without the limit) is already run when rendering https://gitlab.com/dashboard/activity, so we can be reasonably sure this does not affect performance.

Merge request reports