Skip to content

Commit

Permalink
fix(issue): support of ticket waiting for approval
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed May 19, 2020
1 parent 0bb3905 commit f7cdcb1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inc/issue.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ public static function cronSyncIssues(CronTask $task) {
CONCAT('t_',`tic`.`id`) AS `display_id`,
`tic`.`id` AS `original_id`,
'Ticket' AS `sub_itemtype`,
`tic`.`status` AS `status`,
if(`tv`.`status` IS NULL,`tic`.`status`, if(`tv`.`status` = 2, 101, if(`tv`.`status` = 3, 103, 102))) AS `status`,
`tic`.`date` AS `date_creation`,
`tic`.`date_mod` AS `date_mod`,
`tic`.`entities_id` AS `entities_id`,
0 AS `is_recursive`,
`tu`.`users_id` AS `requester_id`,
0 AS `users_id_validator`,
`tv`.`users_id_validate` AS `users_id_validator`,
0 AS `groups_id_validator`,
`tic`.`content` AS `comment`
FROM `glpi_tickets` AS `tic`
Expand All @@ -123,6 +123,8 @@ public static function cronSyncIssues(CronTask $task) {
ORDER BY `id` ASC
LIMIT 1
) AS `tu` ON (`tic`.`id` = `tu`.`tickets_id`)
LEFT JOIN `glpi_ticketvalidations` as `tv`
ON (`tic`.`id` = `tv`.`tickets_id`)
WHERE `tic`.`is_deleted` = 0
GROUP BY `original_id`
HAVING COUNT(`itic`.`items_id`) <= 1";
Expand Down

0 comments on commit f7cdcb1

Please sign in to comment.