From 340a685e123497b7ae1416aba8631c6bbc69507d Mon Sep 17 00:00:00 2001 From: Alexandre Delaunay Date: Wed, 5 Sep 2018 17:00:02 +0200 Subject: [PATCH 1/2] fix search in group dropdown --- ajax/group_values.php | 2 +- scripts/filtergroups.js.php | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ajax/group_values.php b/ajax/group_values.php index 2523b6e..0f7cd28 100644 --- a/ajax/group_values.php +++ b/ajax/group_values.php @@ -30,5 +30,5 @@ $_SESSION['glpicondition'][$rand] = getEntitiesRestrictRequest(" ", "", "entities_id", $_SESSION['glpiactive_entity'], 1). "AND glpi_groups.is_assign"; } -$_POST = $default_options; // fix for glpi 9.1 +$_POST += $default_options; // fix for glpi 9.1 require ("../../../ajax/getDropdownValue.php"); diff --git a/scripts/filtergroups.js.php b/scripts/filtergroups.js.php index 8fc1c8f..8c662c0 100644 --- a/scripts/filtergroups.js.php +++ b/scripts/filtergroups.js.php @@ -58,12 +58,14 @@ ajax: { url: url, dataType: 'json', - data: function (term, page) { + type: 'POST', + data: function (params, page) { + query = params; return { ticket_id: tickets_id, type : type, itilcategories_id: getItilcategories_id(), - searchText: term + searchText: params.term }; }, results: function (data, page) { @@ -71,6 +73,7 @@ return { results: data.results, more: more }; } }, + templateResult: formatResult, initSelection: function (element, callback) { var id = $(element).val(); var defaultid = '0'; @@ -96,8 +99,7 @@ }); } } - }, - templateResult: formatResult + } }); }; From 40d9048f011536b42d3cee9c66f5814b94408b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Mon, 10 Sep 2018 10:33:20 +0200 Subject: [PATCH 2/2] Add 2.1.2 version definition --- itilcategorygroups.xml | 4 ++++ setup.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/itilcategorygroups.xml b/itilcategorygroups.xml index d8ed78f..a32cb68 100644 --- a/itilcategorygroups.xml +++ b/itilcategorygroups.xml @@ -37,6 +37,10 @@ Potom, pro každou z kategorií požadavku je možné určit která skupina bude François Legastelois + + 2.1.2 + 9.3 + 2.1.1 9.3 diff --git a/setup.php b/setup.php index 32da4b2..d3b3b5d 100644 --- a/setup.php +++ b/setup.php @@ -28,7 +28,7 @@ @since 2009 ---------------------------------------------------------------------- */ -define ('PLUGIN_ITILCATEGORYGROUPS_VERSION', '2.1.1'); +define ('PLUGIN_ITILCATEGORYGROUPS_VERSION', '2.1.2'); // Minimal GLPI version, inclusive define("PLUGIN_ITILCATEGORYGROUPS_MIN_GLPI", "9.3");