FIX: Corrigido bug que impedia a alteração de status
This commit is contained in:
parent
c21c00075c
commit
0f412a1588
@ -41,11 +41,8 @@ const processStatusAndClosureController = async () => {
|
||||
// Compara o status real do GLPI com o status que temos do ServiceNow
|
||||
if (glpiLiveStatus !== null && glpiLiveStatusAsString !== snCurrentStatus) {
|
||||
logInfo(`Mudanca de status detectada no GLPI para o ticket ${ticket.glpi_ticket_id}. GLPI esta como '${glpiLiveStatusAsString}', SN esta como '${snCurrentStatus}'.`);
|
||||
if (ticket.source_last !== 'SNOW') {
|
||||
// Hotfix: quando houver divergencia real de status, prioriza GLPI para restaurar fluxo GLPI -> SN.
|
||||
ticket.source_last = 'GLPI';
|
||||
} else {
|
||||
logInfo(`Direcao mantida como SNOW -> GLPI para o ticket ${ticketSnDetails.ticket_number}.`);
|
||||
}
|
||||
}
|
||||
|
||||
// ================= LÓGICA SNOW -> GLPI =================
|
||||
|
||||
Loading…
Reference in New Issue
Block a user