🐛 Explicitly set ticket status to 'New' (#60)
Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit was merged in pull request #60.
This commit is contained in:
@@ -7,15 +7,15 @@
|
||||
try {
|
||||
// Process ticket data
|
||||
$tkt_uuid = Uuid::uuid4()->toString();
|
||||
$stmt = "INSERT INTO tickets (uuid, title, description, created_by) VALUES (:tktuuid, :title, :description, :user)";
|
||||
$stmt = "INSERT INTO tickets (uuid, title, description, status, created_by) VALUES (:tktuuid, :title, :description, :status, :user)";
|
||||
$sql = $db->prepare($stmt);
|
||||
$sql->bindParam(':tktuuid', $tkt_uuid);
|
||||
$sql->bindParam(':title', $_POST['title']);
|
||||
$sql->bindParam(':description', $_POST['description']);
|
||||
$sql->bindParam(':status', 'New');
|
||||
$sql->bindParam(':user', $_SESSION['uuid']);
|
||||
$sql->execute();
|
||||
} catch (PDOException $e) {
|
||||
// echo("Error: <br>" . $e->getMessage() . "<br>");
|
||||
$alert = array("danger", "Failed to create request: " . $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user