Skip to content

Commit

Permalink
fix 'type' search option for Ticket (specific search option)
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz committed Apr 28, 2022
1 parent 5c47b48 commit eb78d37
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions inc/displaycontainer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ public static function showSearchOptionCondition($searchoption_id, $itemtype) {
$twig_params['is_list_values'] = true;
$twig_params['list_values'] = $itemtype::getAllStatusArray(false);
break;
case 'type':
$twig_params['is_list_values'] = true;
$twig_params['list_values'] = $itemtype::getTypes();
break;
case 'impact':
case 'urgency':
case 'priority':
Expand Down Expand Up @@ -282,6 +286,9 @@ public static function getRawValue($searchoption_id, $itemtype, $value) {
case 'impact':
$raw_value = $itemtype::getImpactName($value);
break;
case 'type':
$raw_value = $itemtype::getTicketTypeName($value);
break;
case 'urgency':
$raw_value = $itemtype::getUrgencyName($value);
break;
Expand Down Expand Up @@ -476,6 +483,12 @@ public static function showForTabContainer(CommonGLPI $item, $options = []) {
$twig_params['is_list_values'] = true;
$twig_params['list_values'] =$display_condition->fields['itemtype']::getAllStatusArray(false);
break;
case 'type':
if($display_condition->fields['itemtype'] == Ticket::getType()){
$twig_params['is_list_values'] = true;
$twig_params['list_values'] =$display_condition->fields['itemtype']::getTypes();
}
break;
case 'impact':
case 'urgency':
case 'priority':
Expand Down

0 comments on commit eb78d37

Please sign in to comment.