RAW: Usuario alterado para Agente CAOA
This commit is contained in:
parent
ee168f5d5a
commit
fb3f4eee75
@ -187,7 +187,7 @@ class TicketGlpiModel {
|
|||||||
date: ticketData.opened_at || new Date(),
|
date: ticketData.opened_at || new Date(),
|
||||||
date_mod: ticketData.updated_at || new Date(),
|
date_mod: ticketData.updated_at || new Date(),
|
||||||
status: TicketGlpiModel.mapStatus(ticketData.state || '1'),
|
status: TicketGlpiModel.mapStatus(ticketData.state || '1'),
|
||||||
users_id_recipient: 917,
|
users_id_recipient: 1118,
|
||||||
requesttypes_id: 1,
|
requesttypes_id: 1,
|
||||||
content: formattedDescription,
|
content: formattedDescription,
|
||||||
urgency: 3,
|
urgency: 3,
|
||||||
@ -212,7 +212,7 @@ class TicketGlpiModel {
|
|||||||
`INSERT INTO glpi_tickets_users
|
`INSERT INTO glpi_tickets_users
|
||||||
(tickets_id, users_id, type, use_notification, alternative_email)
|
(tickets_id, users_id, type, use_notification, alternative_email)
|
||||||
VALUES (?, ?, 1, 1, '')`,
|
VALUES (?, ?, 1, 1, '')`,
|
||||||
[ticketId, 917]
|
[ticketId, 1118]
|
||||||
);
|
);
|
||||||
|
|
||||||
await connection.execute(
|
await connection.execute(
|
||||||
@ -260,7 +260,7 @@ class TicketGlpiModel {
|
|||||||
static async getFollowupsByItemId(itemId) {
|
static async getFollowupsByItemId(itemId) {
|
||||||
const connection = await glpiPool.getConnection();
|
const connection = await glpiPool.getConnection();
|
||||||
try {
|
try {
|
||||||
const query = 'SELECT id, content, date, date_creation, date_mod FROM glpi_itilfollowups WHERE items_id = ? AND users_id != 971';
|
const query = 'SELECT id, content, date, date_creation, date_mod FROM glpi_itilfollowups WHERE items_id = ? AND users_id != 1118';
|
||||||
const [rows] = await connection.execute(query, [itemId]);
|
const [rows] = await connection.execute(query, [itemId]);
|
||||||
return rows;
|
return rows;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -273,7 +273,7 @@ class TicketGlpiModel {
|
|||||||
const connection = await glpiPool.getConnection();
|
const connection = await glpiPool.getConnection();
|
||||||
try {
|
try {
|
||||||
const query = 'INSERT INTO glpi_itilfollowups(itemtype, items_id, date, users_id, content, date_creation, date_mod, timeline_position) VALUES(?, ?, NOW(), ?, ?, NOW(), NOW(), ?)';
|
const query = 'INSERT INTO glpi_itilfollowups(itemtype, items_id, date, users_id, content, date_creation, date_mod, timeline_position) VALUES(?, ?, NOW(), ?, ?, NOW(), NOW(), ?)';
|
||||||
const values = ['Ticket', items_id, 971, comment.content , 1];
|
const values = ['Ticket', items_id, 1118, comment.content , 1];
|
||||||
|
|
||||||
const [result] = await connection.execute(query, values);
|
const [result] = await connection.execute(query, values);
|
||||||
return [{ id: result.insertId }];
|
return [{ id: result.insertId }];
|
||||||
@ -313,7 +313,7 @@ class TicketGlpiModel {
|
|||||||
await connection.beginTransaction();
|
await connection.beginTransaction();
|
||||||
|
|
||||||
const solutionQuery = `INSERT INTO glpi_itilsolutions (itemtype, items_id, content, users_id_editor, date_creation, date_mod) VALUES ('Ticket', ?, ?, ?, NOW(), NOW())`;
|
const solutionQuery = `INSERT INTO glpi_itilsolutions (itemtype, items_id, content, users_id_editor, date_creation, date_mod) VALUES ('Ticket', ?, ?, ?, NOW(), NOW())`;
|
||||||
await connection.execute(solutionQuery, [ticketId, solutionContent, 971]);
|
await connection.execute(solutionQuery, [ticketId, solutionContent, 1118]);
|
||||||
|
|
||||||
const updateTicketQuery = `UPDATE glpi_tickets SET status = 5, solvedate = NOW() WHERE id = ?`;
|
const updateTicketQuery = `UPDATE glpi_tickets SET status = 5, solvedate = NOW() WHERE id = ?`;
|
||||||
await connection.execute(updateTicketQuery, [ticketId]);
|
await connection.execute(updateTicketQuery, [ticketId]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user