Fixes ticket status that did not conform to the current ticket statuses to Open

This commit is contained in:
johnnyq
2024-03-30 15:06:52 -04:00
parent 349a276de2
commit 387d2733fa
3 changed files with 29 additions and 18 deletions

View File

@@ -1775,10 +1775,18 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.6'");
}
// if (CURRENT_DATABASE_VERSION == '1.1.6') {
// // Insert queries here required to update to DB version 1.1.7
if (CURRENT_DATABASE_VERSION == '1.1.6') {
// Update existing tickets that did not use the defined statuses to Open
mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 2 WHERE ticket_status NOT IN ('New', 'Open', 'On Hold', 'Auto Close') AND ticket_closed_at IS NULL");
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.7'");
}
// if (CURRENT_DATABASE_VERSION == '1.1.7') {
// // Insert queries here required to update to DB version 1.1.8
// // Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.7'");
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.1.8");
// }
} else {