mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Bugfix: Bulk close should actually be bulk resolve
This commit is contained in:
28
temp_bulk_close_bugfix.php
Normal file
28
temp_bulk_close_bugfix.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php require_once "inc_all.php"; ?>
|
||||
|
||||
<!-- Breadcrumbs-->
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="index.html">Dashboard</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Temp bugfix page</li>
|
||||
</ol>
|
||||
|
||||
<!-- Page Content -->
|
||||
<h1>Temporary page to fix bulk ticket close/resolution bug</h1>
|
||||
<hr>
|
||||
<p>Navigate back to tickets - all bulk closed tickets should be fixed now and no longer appear as open.</p>
|
||||
|
||||
<?php
|
||||
|
||||
$sql_tickets = mysqli_query($mysqli, "SELECT ticket_id, ticket_updated_at, ticket_closed_at FROM tickets WHERE ticket_resolved_at IS NULL AND ticket_closed_at IS NOT NULL");
|
||||
foreach ($sql_tickets as $row) {
|
||||
$ticket_id = intval($row['ticket_id']);
|
||||
$ticket_updated_at = sanitizeInput($row['ticket_updated_at']); // To keep old updated_at time
|
||||
$ticket_closed_at = sanitizeInput($row['ticket_closed_at']); // To keep the original closed time
|
||||
mysqli_query($mysqli, "UPDATE tickets SET ticket_resolved_at = '$ticket_closed_at', ticket_updated_at = '$ticket_updated_at' WHERE ticket_id = '$ticket_id'");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php require_once "footer.php";
|
||||
Reference in New Issue
Block a user