diff --git a/CHANGELOG.md b/CHANGELOG.md index 446ca6e4..66ee6d02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ All notable changes to ITFlow will be documented in this file. - Bugfix: Ticket edit modal not showing multi-client/no-client projects - Bugfix: Asset interface losing DHCP setting - Bugfix: Editing / creating recurring expenses results in error 500 due to incorrect var name -- Stripe online payment setup now prompts you to set the income/expense account +- Bugfix: Recurring tickets no longer require a contact +- Bugfix: Stripe online payment setup now prompts you to set the income/expense account - Admin pages now once again use the new admin role-check - Debug now shows the current git branch - Individual POST handler logic pages can no longer be accessed directly diff --git a/post/user/ticket.php b/post/user/ticket.php index 706f7a82..8fa974e2 100644 --- a/post/user/ticket.php +++ b/post/user/ticket.php @@ -1980,14 +1980,6 @@ if (isset($_POST['add_recurring_ticket'])) { $start_date = sanitizeInput($_POST['start_date']); - // If no contact is selected automatically choose the primary contact for the client - if ($client_id > 0 && $contact_id == 0) { - $sql = mysqli_query($mysqli, "SELECT contact_id FROM contacts WHERE contact_client_id = $client_id AND contact_primary = 1"); - $row = mysqli_fetch_array($sql); - $contact_id = intval($row['contact_id']); - } - - // Add recurring (scheduled) ticket mysqli_query($mysqli, "INSERT INTO scheduled_tickets SET scheduled_ticket_subject = '$subject', scheduled_ticket_details = '$details', scheduled_ticket_priority = '$priority', scheduled_ticket_frequency = '$frequency', scheduled_ticket_billable = $billable, scheduled_ticket_start_date = '$start_date', scheduled_ticket_next_run = '$start_date', scheduled_ticket_assigned_to = $assigned_to, scheduled_ticket_created_by = $session_user_id, scheduled_ticket_client_id = $client_id, scheduled_ticket_contact_id = $contact_id, scheduled_ticket_asset_id = $asset_id"); $scheduled_ticket_id = mysqli_insert_id($mysqli); @@ -2009,14 +2001,6 @@ if (isset($_POST['edit_recurring_ticket'])) { $scheduled_ticket_id = intval($_POST['scheduled_ticket_id']); $next_run_date = sanitizeInput($_POST['next_date']); - // If no contact is selected automatically choose the primary contact for the client - if ($client_id > 0 && $contact_id == 0) { - $sql = mysqli_query($mysqli, "SELECT contact_id FROM contacts WHERE contact_client_id = $client_id AND contact_primary = 1"); - $row = mysqli_fetch_array($sql); - $contact_id = intval($row['contact_id']); - } - - // Edit scheduled ticket mysqli_query($mysqli, "UPDATE scheduled_tickets SET scheduled_ticket_subject = '$subject', scheduled_ticket_details = '$details', scheduled_ticket_priority = '$priority', scheduled_ticket_frequency = '$frequency', scheduled_ticket_billable = $billable, scheduled_ticket_next_run = '$next_run_date', scheduled_ticket_assigned_to = $assigned_to, scheduled_ticket_asset_id = $asset_id, scheduled_ticket_contact_id = $contact_id WHERE scheduled_ticket_id = $scheduled_ticket_id"); // Logging diff --git a/recurring_ticket_add_modal.php b/recurring_ticket_add_modal.php index f1eb7a27..51555c20 100644 --- a/recurring_ticket_add_modal.php +++ b/recurring_ticket_add_modal.php @@ -130,7 +130,7 @@
- diff --git a/recurring_ticket_edit_modal.php b/recurring_ticket_edit_modal.php index f676d1bf..af552996 100644 --- a/recurring_ticket_edit_modal.php +++ b/recurring_ticket_edit_modal.php @@ -85,12 +85,12 @@
- +
-
diff --git a/scripts/cron.php b/scripts/cron.php index 46e00a47..dbbb02b8 100644 --- a/scripts/cron.php +++ b/scripts/cron.php @@ -142,9 +142,7 @@ mysqli_query($mysqli, "DELETE FROM logs WHERE log_created_at < CURDATE() - INTER // Whitelabel - Disable if expired/invalid if ($config_whitelabel_enabled && !validateWhitelabelKey($config_whitelabel_key)) { mysqli_query($mysqli, "UPDATE settings SET config_whitelabel_enabled = 0, config_whitelabel_key = '' WHERE company_id = 1"); - appNotify("Settings", "White-labelling was disabled due to expired/invalid key", "settings_modules.php"); - }