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

more pinpointed override

ulferts12ff4cc5ca27
diff --git a/app/contracts/work_packages/copy_contract.rb b/app/contracts/work_packages/copy_contract.rb
index 6432b42ad8e..da6de498dd7 100644
--- a/app/contracts/work_packages/copy_contract.rb
+++ b/app/contracts/work_packages/copy_contract.rb
@@ -37,13 +37,8 @@ module WorkPackages
attribute :done_ratio,
writable: true
- # Overriding the definition in the CreateContract to allow copying based on the default
- # permission of :add_work_packages.
- attribute :project_phase_definition_id,
- writable: ->(*) {
- OpenProject::FeatureDecisions.stages_and_gates_active?
- },
- permission: :add_work_packages
+ # Use the default permission for the create contract, which is :add_work_packages.
+ attribute_permission :project_phase_definition_id, :add_work_packages
# Do not validate predecessors or children presence when copying: when
# copying, it's possible to create a work package in automatic scheduling