fix(osticket): don't show resolved tickets by other deparments
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ace1c9c84b
commit
da5be333d9
|
@ -9,6 +9,7 @@ SELECT * FROM (
|
||||||
ote.body AS description,
|
ote.body AS description,
|
||||||
oter.body AS resolution
|
oter.body AS resolution
|
||||||
FROM ost_ticket ot
|
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__cdata otc ON ot.ticket_id = otc.ticket_id
|
||||||
JOIN ost_ticket_status ots ON ot.status_id = ots.id
|
JOIN ost_ticket_status ots ON ot.status_id = ots.id
|
||||||
JOIN ost_user otu ON ot.user_id = otu.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
|
LEFT JOIN ost_thread_entry oter ON oth.id = oter.thread_id
|
||||||
AND oter.type = 'R'
|
AND oter.type = 'R'
|
||||||
WHERE ot.ticket_pid IS NULL
|
WHERE ot.ticket_pid IS NULL
|
||||||
AND ots.state = 'closed'
|
|
||||||
AND ot.closed BETWEEN ? AND ?
|
AND ot.closed BETWEEN ? AND ?
|
||||||
|
AND ots.state = 'closed'
|
||||||
|
AND od.code = 'IT'
|
||||||
ORDER BY oter.created DESC
|
ORDER BY oter.created DESC
|
||||||
) ot GROUP BY ot.ticket_id
|
) ot GROUP BY ot.ticket_id
|
||||||
ORDER BY ot.assigned
|
ORDER BY ot.assigned
|
Loading…
Reference in New Issue