FIX: Chamados de implantações são abertos corretamente e einseridos no grupo Implantação
This commit is contained in:
parent
692ad0b583
commit
a75bfadec8
@ -63,12 +63,19 @@ async function insertEntity(entity_name){
|
||||
|
||||
}
|
||||
|
||||
async function insertGroupTicket(ticketId) {
|
||||
async function insertGroupTicket(ticketId, type) {
|
||||
try {
|
||||
|
||||
const groupId = 25
|
||||
|
||||
if (type !== 'IMPLANTACAO') {
|
||||
groupId = 36; // Implantacao
|
||||
}
|
||||
|
||||
const sql = ` INSERT INTO glpi_groups_tickets (tickets_id, groups_id, type)
|
||||
VALUES (?, 25, 2)
|
||||
VALUES (?, ?, 2)
|
||||
`;
|
||||
const values = [ticketId];
|
||||
const values = [ticketId, groupId];
|
||||
await glpi.execute(sql, values);
|
||||
logInfo(`Grupo associado ao ticket GLPI ID: ${ticketId}`);
|
||||
} catch (error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user