fix(osticket): don't show resolved tickets by other deparments
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2021-10-18 08:22:14 +02:00
parent ace1c9c84b
commit da5be333d9
1 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ SELECT * FROM (
ote.body AS description,
oter.body AS resolution
FROM ost_ticket ot
JOIN ost_department od ON od.id = ot.dept_id
JOIN ost_ticket__cdata otc ON ot.ticket_id = otc.ticket_id
JOIN ost_ticket_status ots ON ot.status_id = ots.id
JOIN ost_user otu ON ot.user_id = otu.id
@ -20,8 +21,9 @@ SELECT * FROM (
LEFT JOIN ost_thread_entry oter ON oth.id = oter.thread_id
AND oter.type = 'R'
WHERE ot.ticket_pid IS NULL
AND ots.state = 'closed'
AND ot.closed BETWEEN ? AND ?
AND ots.state = 'closed'
AND od.code = 'IT'
ORDER BY oter.created DESC
) ot GROUP BY ot.ticket_id
ORDER BY ot.assigned