Bug #5031

Tree dropdown list doesn't work

Added by blerohellec almost 8 years ago.

Status:NewStart date:07/31/2014
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


In version 2.3.2, a new field, typed tree-dropdown, is defined as follows for itemtype 'voiture' :

$GO_FIELDS['plugin_genericobject_voiturecartypes_id']['name'] = 'Type de caisse';
$GO_FIELDS['plugin_genericobject_voiturecartypes_id']['field'] = 'cartype';
$GO_FIELDS['plugin_genericobject_voiturecartypes_id']['input_type'] = 'dropdown';
$GO_FIELDS['plugin_genericobject_voiturecartypes_id']['is_tree'] = true;

Indeed, the plugin creates a table (glpi_plugin_genericobjet_voiturecartypes) whose structure is adapted to a tree-dropdown (presence of columns level, *_cache...).
But when creating a new value for this dropdown (Citadine, Berline...), the field 'As child of' does not appear, ie the tree structure of the dropdown is not taken into account.

Deeper investigation shows that in file plugins/genericobject/inc/voiturecartype.class.php :
class PluginGenericobjectVoiturecartype extends CommonDropdown {
where it should be CommonTreeDropdown.

Also available in: Atom PDF