Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

- Fix `massive action` for adding value to `multiple` dropdown fields
- Fix for the `COALESCE` part of the `SQL query` for `multiple` dropdowns
- Fix `search option` for `multiple` dropdown
- Fix display from Planning view
Expand Down
3 changes: 2 additions & 1 deletion inc/container.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,8 @@ public function updateFieldsValues($data, $itemtype, $massiveaction = false)
// Add new values to existing ones
$existing_values = json_decode($obj->fields[$field_name] ?? '[]', true);
$new_values = is_array($data[$field_name]) ? $data[$field_name] : [$data[$field_name]];
$data[$field_name] = json_encode(array_unique(array_merge($existing_values, $new_values)));
$data[$field_name] = json_encode(array_values(array_unique(array_merge($existing_values, $new_values))));

} else {
$data[$field_name] = json_encode($data[$field_name]);
}
Expand Down