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

return nil on matches_query_fitlers_at_*_timestamp? without query

ulferts23c9ac5a0f31
diff --git a/app/models/journable/with_historic_attributes.rb b/app/models/journable/with_historic_attributes.rb
index 2700f3a1703..08efe3bb2c6 100644
--- a/app/models/journable/with_historic_attributes.rb
+++ b/app/models/journable/with_historic_attributes.rb
@@ -169,7 +169,7 @@ class Journable::WithHistoricAttributes < SimpleDelegator
end
def matches_query_filters_at_baseline_timestamp?
- matches_query_filters_at_timestamps.include?(baseline_timestamp)
+ query && matches_query_filters_at_timestamps.include?(baseline_timestamp)
end
def current_timestamp
@@ -177,11 +177,11 @@ class Journable::WithHistoricAttributes < SimpleDelegator
end
def matches_query_filters_at_current_timestamp?
- matches_query_filters_at_timestamps.include?(current_timestamp)
+ query && matches_query_filters_at_timestamps.include?(current_timestamp)
end
def matches_query_filters_at_timestamp?(timestamp)
- matches_query_filters_at_timestamps.include?(timestamp)
+ query && matches_query_filters_at_timestamps.include?(timestamp)
end
def at_timestamp(timestamp)