Skip to content

Commit fe1869f

Browse files
authored
Fix - Add explicit itemtype to search option for GLPI custom dropdown fields (#1149)
* Fix - Add explicit itemtype to search option for GLPI custom dropdown fields * Update CHANGELOG
1 parent 8b34f0f commit fe1869f

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

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

1212
- Fix SQL errors with custom dropdown fields
13+
- Fix wrong values displayed in massive actions when a form contains multiple custom dropdowns
1314

1415
## [1.23.3] - 2026-02-12
1516

hook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function plugin_fields_MassiveActionsFieldsDisplay($options = [])
211211
$itemtypes = PluginFieldsContainer::getEntries('all');
212212

213213
if (in_array($options['itemtype'], $itemtypes)) {
214-
if ($options['options']['is_multiple']) {
214+
if (isset($options['options']['is_multiple']) && $options['options']['is_multiple']) {
215215
Dropdown::showFromArray(
216216
'multiple_dropdown_action',
217217
[

inc/container.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,6 +2221,7 @@ public static function getAddSearchOptions($itemtype, $containers_id = false)
22212221
$opt[$i]['field'] = is_a($dropdown_matches['class'], CommonTreeDropdown::class, true)
22222222
? 'completename'
22232223
: 'name';
2224+
$opt[$i]['itemtype'] = $dropdown_matches['class'];
22242225
$opt[$i]['right'] = 'all';
22252226
$opt[$i]['datatype'] = 'dropdown';
22262227

0 commit comments

Comments
 (0)