Skip to content

Commit af827b8

Browse files
authored
Fix massive action add multiple dropdown (#1004)
* Fix multiple dropdown add massive action * Update Changelog
1 parent 1bd7cd6 commit af827b8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Fixed
1111

12+
- Fix `massive action` for adding value to `multiple` dropdown fields
1213
- Fix for the `COALESCE` part of the `SQL query` for `multiple` dropdowns
1314
- Fix `search option` for `multiple` dropdown
1415
- Fix display from Planning view

inc/container.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,8 @@ public function updateFieldsValues($data, $itemtype, $massiveaction = false)
12421242
// Add new values to existing ones
12431243
$existing_values = json_decode($obj->fields[$field_name] ?? '[]', true);
12441244
$new_values = is_array($data[$field_name]) ? $data[$field_name] : [$data[$field_name]];
1245-
$data[$field_name] = json_encode(array_unique(array_merge($existing_values, $new_values)));
1245+
$data[$field_name] = json_encode(array_values(array_unique(array_merge($existing_values, $new_values))));
1246+
12461247
} else {
12471248
$data[$field_name] = json_encode($data[$field_name]);
12481249
}

0 commit comments

Comments
 (0)