From 7f8a38bec06bd75a324318e99d498b1a0c61a517 Mon Sep 17 00:00:00 2001 From: Lainow Date: Tue, 26 Aug 2025 09:05:09 +0200 Subject: [PATCH 1/3] Add isset --- inc/container.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/container.class.php b/inc/container.class.php index ff7b1a57..df79d627 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1237,7 +1237,7 @@ public function updateFieldsValues($data, $itemtype, $massiveaction = false) $field_name = 'plugin_fields_' . $field_data['name'] . 'dropdowns_id'; } if (array_key_exists($field_name, $data)) { - if ($data['multiple_dropdown_action'] === 'append' && $exist) { + if (isset($data['multiple_dropdown_action']) && $data['multiple_dropdown_action'] === 'append' && $exist) { // 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]]; @@ -1831,7 +1831,7 @@ private static function populateData($c_id, CommonDBTM $item) // ex my_dom[] //in these conditions, the input is never sent by the browser if ($field['multiple']) { - $data['multiple_dropdown_action'] = $_POST['multiple_dropdown_action']; + $data['multiple_dropdown_action'] = $_POST['multiple_dropdown_action'] ?? 'add'; //handle multi dropdown field if ($field['type'] == 'dropdown') { $multiple_key = sprintf('plugin_fields_%sdropdowns_id', $field['name']); From 8ee56310a29cb5a6b39bf69cf321f9b9bd12323d Mon Sep 17 00:00:00 2001 From: Lainow Date: Tue, 26 Aug 2025 09:09:55 +0200 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54fb349d..ffddf79b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASE] +- FIx undefined array key `multiple_dropdown_action` during import - Fix incompatibility of `multiple` dropdowns with `massiveaction` - Fix default value properly applied in multiple dropdown search options - Fix `search option` for default values in `multiple` dropdown From ff798a3ab2152c8984372fffa4e1fa7afe72ac9a Mon Sep 17 00:00:00 2001 From: Lainow Date: Tue, 26 Aug 2025 09:24:17 +0200 Subject: [PATCH 3/3] Fix add to assign --- inc/container.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/container.class.php b/inc/container.class.php index df79d627..d6750d44 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1831,7 +1831,7 @@ private static function populateData($c_id, CommonDBTM $item) // ex my_dom[] //in these conditions, the input is never sent by the browser if ($field['multiple']) { - $data['multiple_dropdown_action'] = $_POST['multiple_dropdown_action'] ?? 'add'; + $data['multiple_dropdown_action'] = $_POST['multiple_dropdown_action'] ?? 'assign'; //handle multi dropdown field if ($field['type'] == 'dropdown') { $multiple_key = sprintf('plugin_fields_%sdropdowns_id', $field['name']);