-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: Bulk close should actually be bulk resolve
- Loading branch information
wrongecho
committed
Aug 19, 2024
1 parent
85f2e8c
commit d43cd03
Showing
3 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters