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

fix journal noop? check

ulferts0acff96c095a
diff --git a/app/models/journal/aggregated_journal.rb b/app/models/journal/aggregated_journal.rb
index 83f9bece403..2e70480116f 100644
--- a/app/models/journal/aggregated_journal.rb
+++ b/app/models/journal/aggregated_journal.rb
@@ -346,7 +346,6 @@ class Journal::AggregatedJournal
:project,
:data,
:data=,
- :noop?,
to: :journal
# Initializes a new AggregatedJournal. Allows to explicitly set a predecessor, if it is already
@@ -422,6 +421,12 @@ class Journal::AggregatedJournal
predecessor.nil?
end
+ # If we where to delegate here, the wrapped journal would be compared to its predecessor which is
+ # not necessarily the this aggreated journal's predecessor.
+ def noop?
+ (!notes || notes&.empty?) && get_changes.empty?
+ end
+
private
attr_reader :journal