mirror of
https://github.com/itflow-org/itflow
synced 2026-11-22 04:17:24 +00:00
Assign an unassigned ticket to the first agent who replies where the client can see it, as Assign to me would, with internal notes, bulk replies and already assigned tickets left alone, and a switch under Admin Settings Tickets Assigning to turn it off (db 4.0.9)
This commit is contained in:
19
admin/database_updates/4.0.9.php
Normal file
19
admin/database_updates/4.0.9.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* ITFlow - Database update to version 4.0.9 (from 4.0.8)
|
||||
* Included by admin/database_updates.php - do not access directly
|
||||
*
|
||||
* settings.config_ticket_reply_assigns - a reply the client sees on a ticket nobody
|
||||
* is assigned to makes it the replying agent's (agent/post/ticket.php, add_ticket_reply).
|
||||
* On to start with; Admin > Settings > Tickets switches it off.
|
||||
*
|
||||
* Re-runnable: the column is only added where it isn't there yet.
|
||||
*/
|
||||
|
||||
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
|
||||
|
||||
if (!mysqli_num_rows(mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'settings' AND COLUMN_NAME = 'config_ticket_reply_assigns'"))) {
|
||||
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ticket_reply_assigns` tinyint(1) NOT NULL DEFAULT 1 AFTER `config_ticket_moving_columns`");
|
||||
}
|
||||
@@ -3,7 +3,8 @@
|
||||
/*
|
||||
* Admin > Settings > Tickets (admin/settings_ticket.php):
|
||||
* edit_ticket_settings saves the numbering, email and text to ticket, who hears of a
|
||||
* new ticket and whether AI triages it, what a quick ticket starts with, the timer
|
||||
* new ticket and whether AI triages it, whether the first agent to reply to an
|
||||
* unassigned ticket is assigned it, what a quick ticket starts with, the timer
|
||||
* and billing, the messages to clients, closing and the tickets page. A next
|
||||
* number already in use, an email address that isn't one or a closing time
|
||||
* out of range comes back to the page saying so - nothing is saved. Billable
|
||||
@@ -21,6 +22,7 @@ if (isset($_POST['edit_ticket_settings'])) {
|
||||
$before = settingsCurrent(array_merge(['config_ticket_prefix', 'config_ticket_next_number', 'config_ticket_email_parse', 'config_ticket_email_parse_unknown_senders',
|
||||
'config_ticket_new_ticket_notification_email', 'config_ticket_timer_autostart', 'config_ticket_default_billable', 'config_ticket_autoclose_hours',
|
||||
'config_ticket_default_view', 'config_ticket_ordering', 'config_ticket_moving_columns'], aiTriageReady() ? ['config_ticket_ai_triage'] : [],
|
||||
version_compare((string) CURRENT_DATABASE_VERSION, '4.0.9', '>=') ? ['config_ticket_reply_assigns'] : [],
|
||||
settingsColumnExists($mysqli, 'config_ticket_sms_parse') ? ['config_ticket_sms_parse', 'config_ticket_sms_unknown_senders', 'config_ticket_sms_acknowledge'] : [],
|
||||
ticketStatusReplyReady() ? ['config_ticket_assigned_message'] : [], ticketNoResponseReady() ? ['config_ticket_no_response_message'] : [],
|
||||
quickTicketReady() ? ['config_quick_ticket_on', 'config_quick_ticket_assign', 'config_quick_ticket_status', 'config_quick_ticket_priority', 'config_quick_ticket_category',
|
||||
@@ -41,6 +43,10 @@ if (isset($_POST['edit_ticket_settings'])) {
|
||||
foreach (['config_ticket_email_parse', 'config_ticket_email_parse_unknown_senders', 'config_ticket_timer_autostart', 'config_ticket_ordering', 'config_ticket_moving_columns'] as $switch) {
|
||||
$after[$switch] = empty($_POST[$switch]) ? 0 : 1;
|
||||
}
|
||||
// Assigning a ticket to the first agent to reply - once the database has it
|
||||
if (array_key_exists('config_ticket_reply_assigns', $before)) {
|
||||
$after['config_ticket_reply_assigns'] = empty($_POST['config_ticket_reply_assigns']) ? 0 : 1;
|
||||
}
|
||||
// Text to ticket - once the database has it
|
||||
if (array_key_exists('config_ticket_sms_parse', $before)) {
|
||||
foreach (['config_ticket_sms_parse', 'config_ticket_sms_unknown_senders', 'config_ticket_sms_acknowledge'] as $switch) {
|
||||
|
||||
@@ -67,6 +67,12 @@ echo settingsPageStart('ticket');
|
||||
<?php } ?>
|
||||
<?= settingsSectionEnd() ?>
|
||||
|
||||
<?php if (version_compare((string) CURRENT_DATABASE_VERSION, '4.0.9', '>=')) { ?>
|
||||
<?= settingsSectionStart('assigning', 'Assigning', 'Who a ticket goes to when nobody has picked it up.') ?>
|
||||
<?= settingsSwitch('config_ticket_reply_assigns', ticketReplyAssigns() ? 1 : 0, ['help' => 'The agent who replies to a ticket nobody is assigned to - by email, by text or as a public note - is assigned it, as Assign to me would. An internal note doesn\'t assign it, so a ticket can be looked at, or someone @mentioned on it, without taking it. A ticket already assigned keeps its agent.']) ?>
|
||||
<?= settingsSectionEnd() ?>
|
||||
<?php } ?>
|
||||
|
||||
<?= settingsSectionStart('time', 'Time and billing', 'How time on a ticket starts, and whether it bills.') ?>
|
||||
<?= settingsSwitch('config_ticket_timer_autostart', $config_ticket_timer_autostart, ['help' => 'The timer runs from opening a ticket, rather than from pressing start.']) ?>
|
||||
<?php if ($config_module_enable_accounting) { ?>
|
||||
|
||||
Reference in New Issue
Block a user