mirror of
https://github.com/itflow-org/itflow
synced 2026-08-05 07:07:14 +00:00
Feature: Add Dynamic Task editing in add ticket and add recurring ticket, recurring tickets now have their own task table as well
This commit is contained in:
@@ -79,8 +79,15 @@ if (isset($_POST['add_ticket'])) {
|
||||
$ticket_id = mysqli_insert_id($mysqli);
|
||||
applyTicketSla($ticket_id);
|
||||
|
||||
// Add Tasks from Template if Template was selected
|
||||
addTasksFromTicketTemplate($ticket_id, $ticket_template_id);
|
||||
// Tasks come from the editable rows in the modal, which the template pre-fills.
|
||||
// Fall back to copying the template directly for a form without that section.
|
||||
if (isset($_POST['tasks_submitted'])) {
|
||||
foreach (parseSubmittedTasks() as $task) {
|
||||
mysqli_query($mysqli, "INSERT INTO tasks SET task_name = '{$task['name']}', task_order = {$task['order']}, task_completion_estimate = {$task['estimate']}, task_ticket_id = $ticket_id");
|
||||
}
|
||||
} else {
|
||||
addTasksFromTicketTemplate($ticket_id, $ticket_template_id);
|
||||
}
|
||||
|
||||
// Add Watchers
|
||||
if (isset($_POST['watchers'])) {
|
||||
|
||||
Reference in New Issue
Block a user