Content
View differences
Updated by Ivan Kuchin 7 months ago
### Steps to reproduce
1. Have a list custom field / project attribute defined on projects
1. The list should allow selecting multiple values.
2. Go to the overview page of a project having the list activated
3. Edit the field in the overview page (opening the modal by clicking on the pen icon of the section the attribute is in)
4. Within the administration, reconfigure the custom field to no longer allow multi selection
5. Again, go to the overview page of the project before
6. Click on the hte pen icon to open the modal for editing the field
### What is the buggy behavior?
* The modal doesn't open
### What is the expected behavior?
1. The modal opens
Additionally, if time permits:
1. When switching the list from multi to single select in the administration, show a danger dialog upon saving. If confirmed, all values but the first are deleted for existing projects.
### **Logs**
[https://appsignal.com/openproject-gmbh/sites/6813715a55b0b20ed373597c/exceptions/incidents/1171](https://appsignal.com/openproject-gmbh/sites/6813715a55b0b20ed373597c/exceptions/incidents/1171)
```text
undefined method 'errors' for an instance of Array
app/forms/custom_fields/inputs/base/input.rb:61 CustomFields::Inputs::Base::Input#invalid?
app/forms/custom_fields/inputs/base/utils.rb:40 CustomFields::Inputs::Base::Utils#base_input_attributes
app/forms/custom_fields/inputs/base/autocomplete/single_value_input.rb:33 CustomFields::Inputs::Base::Autocomplete::SingleValueInput#input_attributes
app/forms/custom_fields/inputs/single_user_select_list.rb:35 block in <class:SingleUserSelectList>
modules/overviews/app/components/overviews/project_custom_fields/edit_component.html.erb:11 block (2 levels) in Overviews::ProjectCustomFields::EditComponent#call
modules/overviews/app/components/overviews/project_custom_fields/edit_component.html.erb:4 block in Overviews::ProjectCustomFields::EditComponent#call
app/components/concerns/op_turbo/streamable.rb:125 OpTurbo::Streamable#component_wrapper
modules/overviews/app/components/overviews/project_custom_fields/edit_component.html.erb:3 Overviews::ProjectCustomFields::EditComponent#call
modules/overviews/app/components/overviews/project_custom_fields/edit_dialog_component.html.erb:11 block (2 levels) in Overviews::ProjectCustomFields::EditDialogComponent#call
modules/overviews/app/components/overviews/project_custom_fields/edit_dialog_component.html.erb:2 Overviews::ProjectCustomFields::EditDialogComponent#call
app/components/concerns/op_turbo/streamable.rb:68 OpTurbo::Streamable#render_as_turbo_stream
app/controllers/concerns/op_turbo/component_stream.rb:67 OpTurbo::ComponentStream#modify_via_turbo_stream
app/controllers/concerns/op_turbo/component_stream.rb:48 OpTurbo::ComponentStream#respond_with_dialog
```
1. Have a list custom field / project attribute defined on projects
1. The list should allow selecting multiple values.
2. Go to the overview page of a project having the list activated
3. Edit the field in the overview page (opening the modal by clicking on the pen icon of the section the attribute is in)
4. Within the administration, reconfigure the custom field to no longer allow multi selection
5. Again, go to the overview page of the project before
6. Click on the
### What is the buggy behavior?
* The modal doesn't open
### What is the expected behavior?
1. The modal opens
Additionally, if time permits:
1. When switching the list from multi to single select in the administration, show a danger dialog upon saving. If confirmed, all values but the first are deleted for existing projects.
### **Logs**
[https://appsignal.com/openproject-gmbh/sites/6813715a55b0b20ed373597c/exceptions/incidents/1171](https://appsignal.com/openproject-gmbh/sites/6813715a55b0b20ed373597c/exceptions/incidents/1171)
```text
undefined method 'errors' for an instance of Array
app/forms/custom_fields/inputs/base/input.rb:61 CustomFields::Inputs::Base::Input#invalid?
app/forms/custom_fields/inputs/base/utils.rb:40 CustomFields::Inputs::Base::Utils#base_input_attributes
app/forms/custom_fields/inputs/base/autocomplete/single_value_input.rb:33 CustomFields::Inputs::Base::Autocomplete::SingleValueInput#input_attributes
app/forms/custom_fields/inputs/single_user_select_list.rb:35 block in <class:SingleUserSelectList>
modules/overviews/app/components/overviews/project_custom_fields/edit_component.html.erb:11 block (2 levels) in Overviews::ProjectCustomFields::EditComponent#call
modules/overviews/app/components/overviews/project_custom_fields/edit_component.html.erb:4 block in Overviews::ProjectCustomFields::EditComponent#call
app/components/concerns/op_turbo/streamable.rb:125 OpTurbo::Streamable#component_wrapper
modules/overviews/app/components/overviews/project_custom_fields/edit_component.html.erb:3 Overviews::ProjectCustomFields::EditComponent#call
modules/overviews/app/components/overviews/project_custom_fields/edit_dialog_component.html.erb:11 block (2 levels) in Overviews::ProjectCustomFields::EditDialogComponent#call
modules/overviews/app/components/overviews/project_custom_fields/edit_dialog_component.html.erb:2 Overviews::ProjectCustomFields::EditDialogComponent#call
app/components/concerns/op_turbo/streamable.rb:68 OpTurbo::Streamable#render_as_turbo_stream
app/controllers/concerns/op_turbo/component_stream.rb:67 OpTurbo::ComponentStream#modify_via_turbo_stream
app/controllers/concerns/op_turbo/component_stream.rb:48 OpTurbo::ComponentStream#respond_with_dialog
```