Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

baseline api: fixing `exists` by avoiding subquery for now

Sebastian Fiedlschuster84bfe212da6c
diff --git a/app/models/journable/with_historic_attributes.rb b/app/models/journable/with_historic_attributes.rb
index bf76669e692..a8625522c31 100644
--- a/app/models/journable/with_historic_attributes.rb
+++ b/app/models/journable/with_historic_attributes.rb
@@ -122,7 +122,7 @@ class Journable::WithHistoricAttributes < SimpleDelegator
assign_historic_attributes_to(
journables,
timestamp:,
- historic_journables: WorkPackage.at_timestamp(timestamp).where(id: journables),
+ historic_journables: WorkPackage.at_timestamp(timestamp).where(id: journables.map(&:id)),
matching_journables: (query_work_packages(query:, timestamp:) if query),
query:
)