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

Feature 50849, removed superfluous writable override for status_id

Richard "Virgo" Richter07e970370534
diff --git a/app/contracts/work_packages/create_contract.rb b/app/contracts/work_packages/create_contract.rb
index 49f4cc547ea..d81e2c57062 100644
--- a/app/contracts/work_packages/create_contract.rb
+++ b/app/contracts/work_packages/create_contract.rb
@@ -38,12 +38,7 @@ module WorkPackages
# Overriding permission from WP base contract to ignore change_work_package_status for creation,
# because we don't require that permission for writable status during WP creation.
# Note that nil would not override and [] would ignore the default permission, so we use the default here:
- permission: :add_work_packages,
- writable: ->(*) {
- # If we did not change into the status,
- # mark unwritable if status and version is closed
- model.status_id_change || !closed_version_and_status?
- }
+ permission: :add_work_packages
default_attribute_permission :add_work_packages