Skip to content

Commit 9e5bd85

Browse files
committed
fix(targetticket): dropdowns for SLA/OLA
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 6153cae commit 9e5bd85

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

inc/abstracttarget.class.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,17 +1038,17 @@ protected function showSLASettings() {
10381038
PluginFormcreatorQuestion::dropdownForForm(
10391039
$this->getForm()->getID(),
10401040
[
1041-
'fieldtype' => 'glpiselect',
1042-
'values' => SLA::getType() . "_TTO",
1041+
'fieldtype' => 'dropdown',
1042+
new QueryExpression("`values` LIKE '%\"itemtype\":\"" . SLA::getType() . "\"%' AND `values` LIKE '%\"show_service_level_types\":\"1\"%'"),
10431043
],
10441044
"_sla_questions_tto",
10451045
$this->fields["sla_question_tto"]
10461046
);
10471047
PluginFormcreatorQuestion::dropdownForForm(
10481048
$this->getForm()->getID(),
10491049
[
1050-
'fieldtype' => 'glpiselect',
1051-
'values' => SLA::getType() . "_TTR",
1050+
'fieldtype' => 'dropdown',
1051+
new QueryExpression("`values` LIKE '%\"itemtype\":\"" . SLA::getType() . "\"%' AND `values` LIKE '%\"show_service_level_types\":\"0\"%'"),
10521052
],
10531053
"_sla_questions_ttr",
10541054
$this->fields["sla_question_ttr"]
@@ -1109,17 +1109,17 @@ protected function showOLASettings() {
11091109
PluginFormcreatorQuestion::dropdownForForm(
11101110
$this->getForm()->getID(),
11111111
[
1112-
'fieldtype' => 'glpiselect',
1113-
'values' => OLA::getType() . "_TTO",
1112+
'fieldtype' => 'dropdown',
1113+
new QueryExpression("`values` LIKE '%\"itemtype\":\"" . OLA::getType() . "\"%' AND `values` LIKE '%\"show_service_level_types\":\"1\"%'"),
11141114
],
11151115
"_ola_questions_tto",
11161116
$this->fields["ola_question_tto"]
11171117
);
11181118
PluginFormcreatorQuestion::dropdownForForm(
11191119
$this->getForm()->getID(),
11201120
[
1121-
'fieldtype' => 'glpiselect',
1122-
'values' => OLA::getType() . "_TTR",
1121+
'fieldtype' => 'dropdown',
1122+
new QueryExpression("`values` LIKE '%\"itemtype\":\"" . OLA::getType() . "\"%' AND `values` LIKE '%\"show_service_level_types\":\"0\"%'"),
11231123
],
11241124
"_ola_questions_ttr",
11251125
$this->fields["ola_question_ttr"]

0 commit comments

Comments
 (0)