HOTFIX: Notify when ticket doesn't have a team
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
6eba19a1b7
commit
db81d7d6d4
|
@ -21,7 +21,10 @@ module.exports = Self => {
|
||||||
JOIN ost_user_account ua ON t.user_id = ua.user_id
|
JOIN ost_user_account ua ON t.user_id = ua.user_id
|
||||||
JOIN ost_ticket__cdata td ON t.ticket_id = td.ticket_id
|
JOIN ost_ticket__cdata td ON t.ticket_id = td.ticket_id
|
||||||
JOIN ost_ticket_priority tp ON td.priority = tp.priority_id
|
JOIN ost_ticket_priority tp ON td.priority = tp.priority_id
|
||||||
WHERE tp.priority = 'emergency' AND t.staff_id = 0
|
LEFT JOIN ost_department dept ON dept.id = t.dept_id
|
||||||
|
WHERE tp.priority = 'emergency'
|
||||||
|
AND (t.staff_id = 0 AND t.team_id = 0)
|
||||||
|
AND dept.code = 'IT'
|
||||||
`);
|
`);
|
||||||
|
|
||||||
if (!tickets.length) return;
|
if (!tickets.length) return;
|
||||||
|
|
|
@ -27,7 +27,7 @@ describe('Chat notifyIssue()', () => {
|
||||||
username: 'batman',
|
username: 'batman',
|
||||||
subject: 'Issue title'}
|
subject: 'Issue title'}
|
||||||
]);
|
]);
|
||||||
const expectedMessage = `@all ➔ There's a new urgent ticket:\r\n[ID: *00001* - Issue title (@batman)](https://osticket.verdnatura.es/scp/tickets.php?id=1)`;
|
const expectedMessage = `@all ➔ There's a new urgent ticket:\r\n[ID: *00001* - Issue title (@batman)](https://cau.verdnatura.es/scp/tickets.php?id=1)`;
|
||||||
|
|
||||||
const department = await app.models.Department.findById(departmentId);
|
const department = await app.models.Department.findById(departmentId);
|
||||||
let orgChatName = department.chatName;
|
let orgChatName = department.chatName;
|
||||||
|
|
Loading…
Reference in New Issue