mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Added Ticket Templates and the ability to add Tasks to the template, reworked the ticket details tasks and adding tasks
This commit is contained in:
@@ -56,6 +56,17 @@ if (isset($_POST['add_ticket'])) {
|
||||
|
||||
$ticket_id = mysqli_insert_id($mysqli);
|
||||
|
||||
// Add Tasks
|
||||
if (!empty($_POST['tasks'])) {
|
||||
foreach ($_POST['tasks'] as $task) {
|
||||
$task_name = sanitizeInput($task);
|
||||
// Check that task_name is not-empty (For some reason the !empty on the array doesnt work here like in watchers)
|
||||
if (!empty($task_name)) {
|
||||
mysqli_query($mysqli,"INSERT INTO tasks SET task_name = '$task_name', task_ticket_id = $ticket_id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add Watchers
|
||||
if (!empty($_POST['watchers'])) {
|
||||
foreach ($_POST['watchers'] as $watcher) {
|
||||
|
||||
Reference in New Issue
Block a user