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

adapt sql in historic attributes timestamp

ulferts71e973671e3a
diff --git a/app/models/journal/timestamps.rb b/app/models/journal/timestamps.rb
index ecc732949da..57c4b9368ee 100644
--- a/app/models/journal/timestamps.rb
+++ b/app/models/journal/timestamps.rb
@@ -70,7 +70,7 @@ module Journal::Timestamps
timestamp = timestamp.to_time if timestamp.kind_of? Timestamp
timestamp = timestamp.in_time_zone if timestamp.kind_of? DateTime
- where(["validity_period @> timestamp with time zone ?", timestamp])
+ where(OpenProject::SqlSanitization.sanitize("validity_period @> timestamp with time zone :timestamp", timestamp:))
end
end
end