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

Merge remote-tracking branch 'origin/dev' into maintenance/ruby-2.7.1-upgrade

ulfertsb9803fac4cfe
diff --cc Gemfile.lock
index 1b307731fdc,9a0a5d4d813..74601dd6890
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@@ -654,7 -655,8 +654,8 @@@ GE
validate_email
validate_url
webfinger (>= 1.0.1)
- openproject-token (1.0.2)
- openproject-token (2.1.2)
++ openproject-token (2.1.3)
+ activemodel
parallel (1.19.1)
parallel_tests (2.32.0)
parallel
diff --cc lib/plugins/acts_as_journalized/lib/acts_as_journalized.rb
index e8c7845f052,22e18e0f0b9..cb0578675b7
--- a/lib/plugins/acts_as_journalized/lib/acts_as_journalized.rb
+++ b/lib/plugins/acts_as_journalized/lib/acts_as_journalized.rb
@@@ -49,51 -49,47 +49,47 @@@
require 'journal_changes'
require 'journal_formatter'
- Dir[File.expand_path('../redmine/acts/journalized/*.rb', __FILE__)].each { |f| require f }
- Dir[File.expand_path('../acts/journalized/*.rb', __FILE__)].each { |f| require f }
- module Redmine
- module Acts
- module Journalized
- def self.included(base)
- base.extend ClassMethods
- base.extend Journalized
- end
+ module Acts
+ end
+
+ Dir[File.expand_path('../acts/journalized/*.rb', __FILE__)].sort.each { |f| require f }
- module ClassMethods
- def plural_name
- name.underscore.pluralize
- end
+ module Acts
+ module Journalized
+ def self.included(base)
+ base.extend ClassMethods
+ base.extend Journalized
+ end
- # This call will add an activity and, if neccessary, start the journaling and
- # add an event callback on the model.
- # Versioning and acting as an Event may only be applied once.
- # To apply more than on activity, use acts_as_activity
- def acts_as_journalized(options = {}, &block)
- return if journaled?
+ module ClassMethods
+ def plural_name
+ name.underscore.pluralize
+ end
- include_aaj_modules
+ # This call will start journaling the model.
+ def acts_as_journalized(options = {})
+ return if journaled?
- journal_hash = prepare_journaled_options(options)
+ include_aaj_modules
- has_many :journals, -> {
- order("#{Journal.table_name}.version ASC")
- }, **journal_hash, &block
- end
+ journal_hash = prepare_journaled_options(options)
- private
+ has_many :journals, -> {
+ order("#{Journal.table_name}.version ASC")
- }, journal_hash
++ }, **journal_hash
+ end
- def include_aaj_modules
- include Options
- include Creation
- include Reversion
- include Permissions
- include SaveHooks
- include FormatHooks
+ private
- # FIXME: When the transition to the new API is complete, remove me
- include Deprecated
- end
+ def include_aaj_modules
+ include Options
+ include Creation
+ include Reversion
+ include Permissions
+ include SaveHooks
+ include FormatHooks
+ include DataClass
end
end
end