mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
cf241951eb
Rails 8.1 removed deprecated support for stripping leading brackets in parameter names (rails/rails#53471). Previously, a form field named `[custom_field_values][123]` was parsed as `{ "custom_field_values" => { "123" => "" } }`. In Rails 8.1, it is parsed as `{ "[custom_field_values]" => { "123" => "" } }`, making the custom field values invisible to `params.fetch(:custom_field_values, {})`. `custom_field_tag_for_bulk_edit` was called with an empty string as the `name` prefix (e.g. in the work package move form), producing field names like `[custom_field_values][42]` — starting with a leading bracket. This caused required custom field validation to be silently skipped during moves, allowing work packages to be moved without filling in required fields. The fix avoids the leading bracket by emitting `custom_field_values[42]` when no name prefix is given.