fix: permite cerrar varios estados
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2023-01-13 08:38:03 +01:00
parent 6a8e7873fa
commit 1c532d81e8
1 changed files with 3 additions and 1 deletions

View File

@ -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)