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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
avoid naming conflicts when patching
ulferts2aac9920c1a1
diff --git a/lib/open_project/plugins/acts_as_op_engine.rb b/lib/open_project/plugins/acts_as_op_engine.rbindex 5dbae38a845..97b63593d83 100644--- a/lib/open_project/plugins/acts_as_op_engine.rb+++ b/lib/open_project/plugins/acts_as_op_engine.rb@@ -119,7 +119,11 @@ module OpenProject::Pluginsplugin_module = self.class.to_s.deconstantizeself.class.config.to_prepare doklass_name = args.last- patch = "#{plugin_module}::Patches::#{klass_name}Patch".constantize+ patch = begin+ "#{plugin_module}::Patches::#{args[0..-2].join('::')}::#{klass_name}Patch".constantize+ rescue NameError+ "#{plugin_module}::Patches::#{klass_name}Patch".constantize+ endqualified_class_name = args.map(&:to_s).join('::')klass = qualified_class_name.to_s.constantizeklass.send(:include, patch) unless klass.included_modules.include?(patch)