From 5ac16583c804f3823b6824df40a8cc4521297844 Mon Sep 17 00:00:00 2001 From: MyuTsu Date: Mon, 7 Jul 2025 09:26:54 +0200 Subject: [PATCH 1/5] fix(MassiveAction): fix incompatibility with multiple dropdowns --- inc/container.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/container.class.php b/inc/container.class.php index d8cc983f..730a9d80 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1833,6 +1833,9 @@ private static function populateData($c_id, CommonDBTM $item) ) { //multi dropdown is empty or has been emptied $data[$multiple_key] = []; $has_fields = true; + } elseif ($_POST[$multiple_key] ?? false) { + $data[$multiple_key] = $_POST[$multiple_key]; + $has_fields = true; } } From b41011720f011a41a0134da146f084883d571e0d Mon Sep 17 00:00:00 2001 From: MyuTsu Date: Mon, 7 Jul 2025 09:34:00 +0200 Subject: [PATCH 2/5] CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d90cda65..3e7922ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASE] +- Fix incompatibility with multiple dropdowns + ## [1.21.22] - 2025-05-28 ### Fixed From 9bc22f242d2c6051e73d42947b1d2bbac07ee823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Langlois=20Ga=C3=ABtan?= <64356364+MyvTsv@users.noreply.github.com> Date: Tue, 8 Jul 2025 10:16:26 +0200 Subject: [PATCH 3/5] Update inc/container.class.php Co-authored-by: Stanislas --- inc/container.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/container.class.php b/inc/container.class.php index 730a9d80..ad76776f 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1833,9 +1833,11 @@ private static function populateData($c_id, CommonDBTM $item) ) { //multi dropdown is empty or has been emptied $data[$multiple_key] = []; $has_fields = true; - } elseif ($_POST[$multiple_key] ?? false) { - $data[$multiple_key] = $_POST[$multiple_key]; - $has_fields = true; + } elseif (isset($_REQUEST['massiveaction'])) { // called from massiveaction + if (isset($_POST[$multiple_key])) { + $data[$multiple_key] = $_POST[$multiple_key]; + $has_fields = true; + } } } From f95d2628809b6c56278d25898e96a364df061d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Langlois=20Ga=C3=ABtan?= <64356364+MyvTsv@users.noreply.github.com> Date: Tue, 8 Jul 2025 10:16:32 +0200 Subject: [PATCH 4/5] Update CHANGELOG.md Co-authored-by: Stanislas --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e7922ec..65a67347 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASE] -- Fix incompatibility with multiple dropdowns +- Fix incompatibility of `multiple` dropdowns with `massiveaction` ## [1.21.22] - 2025-05-28 From ca16f7f2dfc7af592126f7d82760fe73d3228168 Mon Sep 17 00:00:00 2001 From: MyuTsu Date: Tue, 8 Jul 2025 10:23:13 +0200 Subject: [PATCH 5/5] lint --- 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 ad76776f..8d5c3fe4 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1833,7 +1833,7 @@ private static function populateData($c_id, CommonDBTM $item) ) { //multi dropdown is empty or has been emptied $data[$multiple_key] = []; $has_fields = true; - } elseif (isset($_REQUEST['massiveaction'])) { // called from massiveaction + } elseif (isset($_REQUEST['massiveaction'])) { // called from massiveaction if (isset($_POST[$multiple_key])) { $data[$multiple_key] = $_POST[$multiple_key]; $has_fields = true;