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

fix(central): add incoming ticket too

parent 7a584f01
...@@ -5081,12 +5081,13 @@ class Ticket extends CommonITILObject { ...@@ -5081,12 +5081,13 @@ class Ticket extends CommonITILObject {
); );
break; break;
case "process" : // planned or assigned tickets case "process" : // planned or assigned or incoming tickets
$WHERE = array_merge( $WHERE = array_merge(
$WHERE, $WHERE,
$search_assign, $search_assign,
['glpi_tickets.status' => self::getProcessStatusArray()] ['glpi_tickets.status' => [self::ASSIGNED, self::PLANNED, self::INCOMING]]
); );
break; break;
case "toapprove" : //tickets waiting for approval case "toapprove" : //tickets waiting for approval
...@@ -5261,6 +5262,7 @@ class Ticket extends CommonITILObject { ...@@ -5261,6 +5262,7 @@ class Ticket extends CommonITILObject {
if (count($JOINS)) { if (count($JOINS)) {
$criteria = array_merge_recursive($criteria, $JOINS); $criteria = array_merge_recursive($criteria, $JOINS);
} }
$iterator = $DB->request($criteria); $iterator = $DB->request($criteria);
$total_row_count = count($iterator); $total_row_count = count($iterator);
$displayed_row_count = (int)$_SESSION['glpidisplay_count_on_home'] > 0 $displayed_row_count = (int)$_SESSION['glpidisplay_count_on_home'] > 0
...@@ -5312,15 +5314,22 @@ class Ticket extends CommonITILObject { ...@@ -5312,15 +5314,22 @@ class Ticket extends CommonITILObject {
break; break;
case "process" : case "process" :
$options['criteria'][0]['field'] = 12; // status
$options['criteria'][0]['searchtype'] = 'equals';
$options['criteria'][0]['value'] = 'process';
$options['criteria'][0]['link'] = 'AND';
$options['criteria'][1]['field'] = 8; // groups_id_assign $options['criteria'][2]['field'] = 8; // groups_id_assign
$options['criteria'][1]['searchtype'] = 'equals'; $options['criteria'][2]['searchtype'] = 'equals';
$options['criteria'][1]['value'] = 'mygroups'; $options['criteria'][2]['value'] = 'mygroups';
$options['criteria'][1]['link'] = 'AND'; $options['criteria'][2]['link'] = 'AND';
$options['criteria'][4]['link'] = 'AND';
$options['criteria'][4]['criteria'][0]['link'] = 'AND';
$options['criteria'][4]['criteria'][0]['field'] = 12;
$options['criteria'][4]['criteria'][0]['searchtype'] = 'equals';
$options['criteria'][4]['criteria'][0]['value'] = 1;
$options['criteria'][4]['criteria'][1]['link'] = 'OR';
$options['criteria'][4]['criteria'][1]['field'] = 12;
$options['criteria'][4]['criteria'][1]['searchtype'] = 'equals';
$options['criteria'][4]['criteria'][1]['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