diff --git a/back/methods/osticket/closeTicket.js b/back/methods/osticket/closeTicket.js index b0ec78c95..32b369c8d 100644 --- a/back/methods/osticket/closeTicket.js +++ b/back/methods/osticket/closeTicket.js @@ -51,9 +51,11 @@ module.exports = Self => { AND IF(sub.updated > sub.created, sub.updated, sub.created) < DATE_SUB(CURDATE(), INTERVAL ? DAY);`; const ticketsId = []; + const statusIdToClose = config.oldStatus.split(','); + con.connect(err => { if (err) throw err; - con.query(sql, [config.oldStatus, config.day], + con.query(sql, [statusIdToClose, config.day], (err, results) => { if (err) throw err; for (const result of results)