Commit facd91e9 authored by Stanislas KITA's avatar Stanislas KITA Committed by Johan Cwiklinski
Browse files

fix criteria index and status computation

parent 8dfe8f28
...@@ -5085,7 +5085,7 @@ class Ticket extends CommonITILObject { ...@@ -5085,7 +5085,7 @@ class Ticket extends CommonITILObject {
$WHERE = array_merge( $WHERE = array_merge(
$WHERE, $WHERE,
$search_assign, $search_assign,
['glpi_tickets.status' => [self::ASSIGNED, self::PLANNED, self::INCOMING]] ['glpi_tickets.status' => array_merge(self::getProcessStatusArray(), [self::INCOMING])]
); );
break; break;
...@@ -5315,21 +5315,31 @@ class Ticket extends CommonITILObject { ...@@ -5315,21 +5315,31 @@ class Ticket extends CommonITILObject {
case "process" : case "process" :
$options['criteria'][2]['field'] = 8; // groups_id_assign $options['criteria'] = [
$options['criteria'][2]['searchtype'] = 'equals'; [
$options['criteria'][2]['value'] = 'mygroups'; 'field' => 8,
$options['criteria'][2]['link'] = 'AND'; 'searchtype' => 'equals',
'value' => 'mygroups',
$options['criteria'][4]['link'] = 'AND'; 'link' => 'AND',
$options['criteria'][4]['criteria'][0]['link'] = 'AND'; ],
$options['criteria'][4]['criteria'][0]['field'] = 12; [
$options['criteria'][4]['criteria'][0]['searchtype'] = 'equals'; 'link' => 'AND',
$options['criteria'][4]['criteria'][0]['value'] = 1; 'criteria' => [
[
$options['criteria'][4]['criteria'][1]['link'] = 'OR'; 'link' => 'AND',
$options['criteria'][4]['criteria'][1]['field'] = 12; 'field' => 12,
$options['criteria'][4]['criteria'][1]['searchtype'] = 'equals'; 'searchtype' => 'equals',
$options['criteria'][4]['criteria'][1]['value'] = 'process'; 'value' => Ticket::INCOMING,
],
[
'link' => 'OR',
'field' => 12,
'searchtype' => 'equals',
'value' => 'process',
]
]
]
];
echo "<a href=\"".Ticket::getSearchURL()."?". echo "<a href=\"".Ticket::getSearchURL()."?".
Toolbox::append_params($options, '&amp;')."\">". Toolbox::append_params($options, '&amp;')."\">".
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment