From ee3f31ff056318ae579dab6b5f2f9cc7417af02d Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 30 Nov 2026 13:51:33 -0500 Subject: [PATCH] Call watchers CCs everywhere they show: the ticket's Linked card, Add CC, New Ticket's CC field, the reply To line, email footnotes and the copied-in email, ticket history, audit log, messages, Try an Email, settings, mail previews, Dispatch and the resolve and schedule windows; the code, the ticket_watchers table and the API keep their names for now; 26.12.3 changelog reworded --- CHANGELOG.md | 20 ++++++++++--------- .../ticket_status/ticket_status_form.php | 2 +- admin/settings_notification.php | 2 +- admin/settings_ticket.php | 4 ++-- agent/dispatch.php | 2 +- agent/js/dispatch.js | 2 +- agent/modals/ticket/ticket_add.php | 2 +- agent/modals/ticket/ticket_add_watcher.php | 6 +++--- agent/modals/ticket/ticket_bulk_resolve.php | 2 +- agent/modals/ticket/ticket_edit_schedule.php | 2 +- .../ticket/ticket_resolve_no_response.php | 4 ++-- agent/post/ticket.php | 20 +++++++++---------- agent/ticket.php | 8 ++++---- cron/ticket_email_parser.php | 10 +++++----- functions/email_preview.php | 14 ++++++------- functions/settings.php | 8 ++++---- functions/ticket.php | 6 +++--- functions/ticket_mail_try.php | 8 ++++---- functions/ticket_reply_recipients.php | 4 ++-- 19 files changed, 64 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abf23386b..40cb49e16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ This file documents all notable changes made to ITFlow. ### Upgrading to 26.12.3 -Update from Maintenance > Update as usual - this release has six database changes: 4.2.2 adds a table for passkeys and a setting to turn them on or off, 4.2.3 lets a document keep the Markdown it was written in, 4.2.4 lets a ticket keep its pictures as files, 4.2.5 adds identity providers, 4.2.6 keeps each ticket's email conversation together, and 4.2.7 lets a reply from a watcher say who sent it. The client portal's Microsoft 365 single sign-on becomes the first identity provider, for client contacts, and keeps its redirect address, so nothing changes in Microsoft Entra. Nothing else is required: passkeys are on, and no one has one until they add it. Pictures already inside tickets move to files in the background afterwards - the new Ticket Pictures job in Maintenance > Cron does a batch a minute, so an install with years of emailed screenshots may take a while, and tickets work as usual meanwhile. A passkey is made for your ITFlow's address (the one in config.php) and only works there, over HTTPS - if you move ITFlow to a new address, everyone adds theirs again. Emails about a ticket now go to its contact with the watchers copied in, rather than one each - Admin > Settings > Tickets has the switch, under Emails about a ticket. +Update from Maintenance > Update as usual - this release has six database changes: 4.2.2 adds a table for passkeys and a setting to turn them on or off, 4.2.3 lets a document keep the Markdown it was written in, 4.2.4 lets a ticket keep its pictures as files, 4.2.5 adds identity providers, 4.2.6 keeps each ticket's email conversation together, and 4.2.7 lets a reply from a CC say who sent it. The client portal's Microsoft 365 single sign-on becomes the first identity provider, for client contacts, and keeps its redirect address, so nothing changes in Microsoft Entra. Nothing else is required: passkeys are on, and no one has one until they add it. Pictures already inside tickets move to files in the background afterwards - the new Ticket Pictures job in Maintenance > Cron does a batch a minute, so an install with years of emailed screenshots may take a while, and tickets work as usual meanwhile. A passkey is made for your ITFlow's address (the one in config.php) and only works there, over HTTPS - if you move ITFlow to a new address, everyone adds theirs again. Watchers are called CCs now. Emails about a ticket go to its contact with the CCs copied in, rather than one each - Admin > Settings > Tickets has the switch, under Emails about a ticket. ### New Features & Updates @@ -50,26 +50,27 @@ Update from Maintenance > Update as usual - this release has six database change - The icon pickers in the tag, category, link and asset type windows show three rows and scroll, starting on the icon picked. - Invoicing a ticket on a new invoice gives the invoice the ticket's number and subject as its scope, without asking - change it on the invoice. Making a quote from a ticket has a smaller description box. - A ticket's emails stay together as one conversation in the client's inbox. Each has the same subject from the first to the last - its number in brackets, then its subject: [TCK-123] Printer offline - where it used to change with each email ("Ticket update - ...", "Ticket resolved - ... | (pending closure)"), and each carries the headers mail programs keep a conversation together by. A reply finds its ticket by those headers first, so one whose subject was changed still lands on it, and so does a reply to all on the client's first email, sent before anyone had the ticket's number. -- One email, with the watchers copied in: an email about a ticket goes to its contact with the watchers, and the colleagues who asked for every update, copied in (Cc), so they see who else has it and a reply to all reaches everyone. The To line on an email reply works the same way - the contact in To, everyone else copied in. Switch it off under Admin > Settings > Tickets, Emails about a ticket, for an email each as before. -- A client's reply goes on to the watchers: when the client replies by email, text or in the portal, the people an agent's reply would go to get it too, with its files - not anyone it was already to or copied to. By email, only a reply to one of the ticket's emails is passed on, as anyone can put a ticket number in a subject. It can be switched off in the same place. -- Whoever the client also emails, or copies in, follows the ticket: the other people in To and Cc on the email that raises a ticket, and on a reply from the client or a watcher, become its watchers - never your own addresses, anyone else at your domain or your agents. The ticket's history says who. +- Watchers are called CCs, as that is what they are now: on every email about the ticket, and their replies count as the client's. On a ticket it's the CC list on the Linked card and Add CC on its +, and New Ticket has a CC field. +- One email, with the CCs copied in: an email about a ticket goes to its contact with the CCs, and the colleagues who asked for every update, copied in (Cc), so they see who else has it and a reply to all reaches everyone. The To line on an email reply works the same way - the contact in To, everyone else copied in. Switch it off under Admin > Settings > Tickets, Emails about a ticket, for an email each as before. +- A client's reply goes on to the CCs: when the client replies by email, text or in the portal, the people an agent's reply would go to get it too, with its files - not anyone it was already to or copied to. By email, only a reply to one of the ticket's emails is passed on, as anyone can put a ticket number in a subject. It can be switched off in the same place. +- Whoever the client also emails, or copies in, follows the ticket: the other people in To and Cc on the email that raises a ticket, and on a reply from the client or a CC, become its CCs - never your own addresses, anyone else at your domain or your agents. The ticket's history says who. - An email that lands in the support mailbox twice - sent to two of your addresses that both go to it - makes one ticket. -- A watcher's reply by email is the client's reply now, named on the ticket, rather than an internal note headed "Contact email mismatch". It reopens the ticket and goes on to the contact and anyone else following it who wasn't on it, as the contact's reply does. The same goes for the person whose email raised a ticket with no client - before, their replies could only ever be notes. +- A CC's reply by email is the client's reply now, named on the ticket, rather than an internal note headed "Contact email mismatch". It reopens the ticket and goes on to the contact and anyone else following it who wasn't on it, as the contact's reply does. The same goes for the person whose email raised a ticket with no client - before, their replies could only ever be notes. - A bounce is read whatever your settings: the contacts it failed for are marked Email bounced, the ticket the email was about gets a note saying who it couldn't reach and what their mail server said - found by the email that bounced, so a bounce from Microsoft 365 or Gmail finds it too - and agents get a notice. It never makes a ticket. A bounce used to be read only with From unknown senders too on, and otherwise sat flagged in the mailbox. A notice that an email is only delayed is set aside. - An out-of-office reply to a ticket's email is an internal note on the ticket, to read - it doesn't reopen it, and agents don't get a notice each time. One that answers no ticket is set aside, as before. - Email sent by a system, a mailing list or a newsletter still makes tickets - alerts emailed in keep working - but is never answered: no "we have your email", no "that ticket is closed". ITFlow's own automatic emails say they are automatic, so the other side's out-of-office doesn't answer them, and no one address gets more than five of them an hour - so two systems can't keep answering each other. -- Two people at a client raising the same problem in the same week - "Printer not working" - get a ticket each, linked as related, rather than the second email landing on the first person's ticket. It's still a reply on the ticket from its contact or a watcher. -- A reply to a closed ticket is kept on it as an internal note instead of left in the mailbox, and the notice says so. The ticket isn't reopened. The client or watcher is told it is closed, as before - but not someone with no part in the ticket, who learned nothing from a number they guessed. +- Two people at a client raising the same problem in the same week - "Printer not working" - get a ticket each, linked as related, rather than the second email landing on the first person's ticket. It's still a reply on the ticket from its contact or a CC. +- A reply to a closed ticket is kept on it as an internal note instead of left in the mailbox, and the notice says so. The ticket isn't reopened. The client or CC is told it is closed, as before - but not someone with no part in the ticket, who learned nothing from a number they guessed. ### Bug Fixes - Documents created or edited through the API no longer get extra backslashes added before quotes and line breaks, and changing only a document's name through the API no longer changes what it says. -- Deleting a client deletes its tickets' attachments and pictures, files and all, and their tasks, watchers and history, instead of leaving them behind. +- Deleting a client deletes its tickets' attachments and pictures, files and all, and their tasks, CCs and history, instead of leaving them behind. - Pictures saved as WebP show in a client's documentation PDF and a document's PDF instead of being left out. - A client page opened without a client in its address, such as an old bookmark to a client's overview, was a blank page. It now says That client isn't here, as it does for a client that's been deleted, with the menu and a way back to Clients. - The notice that white-labelling was turned off opens Admin > Settings > Modules, instead of a page that isn't there. - The old Access Modules page, already off the Admin menu, is gone. What each role can do is set on the role, in Admin > Roles. -- A client who CCs your support mailbox no longer makes it a watcher. As one, every email about the ticket went back into the mailbox, came back in as a note and reopened the ticket - a resolved ticket reopened a minute later. Mail from ITFlow's own addresses is now set aside in the ITFlow folder without a ticket, and nothing about a ticket is emailed to them, so a support mailbox already watching a ticket stops getting copies too. +- A client who CCs your support mailbox no longer adds it to the ticket's CCs. As one, every email about the ticket went back into the mailbox, came back in as a note and reopened the ticket - a resolved ticket reopened a minute later. Mail from ITFlow's own addresses is now set aside in the ITFlow folder without a ticket, and nothing about a ticket is emailed to them, so a support mailbox already on a ticket's CCs stops getting copies too. - Email new tickets to (Admin > Settings > Tickets) can't be the mailbox ITFlow reads tickets from any more: each notice could come back in as a new email and raise another ticket, whose notice raised another, every minute. One saved before isn't emailed. - Email someone opened before ITFlow got to it - Outlook marks an email read as soon as it shows it - is made a ticket now, when it came in the last hour. It used to stay in the mailbox for good. Read email older than that, such as what was there when the mailbox was connected, is left alone. - An email to a domain whose mail server couldn't be found is tried again like any other failed email, and a domain with no MX record that takes mail at its own address is found. One failed lookup used to fail the email for good. @@ -122,6 +123,7 @@ Update from Maintenance > Update as usual - this release has six database change - functions/ticket_mail_auto.php: ticketMailHeaderMap() (lower-case name => raw value), ticketMailIsBounce() (multipart/report with report-type=delivery-status, X-Failed-Recipients, or a TICKET_MAIL_BOUNCE_SENDERS local part - replacing the /daemon|postmaster|bounce|mta/i pattern), ticketMailAutomaticKind() (auto-reply: Auto-Submitted auto-replied, Precedence auto_reply, X-Autoreply, X-Autorespond, or an "Automatic reply:"/"Out of Office:" subject with X-Auto-Response-Suppress or a [ticket number]; automated: any other Auto-Submitted but no, Precedence bulk/list/junk, List-Id, List-Unsubscribe), ticketMailBounceRead() (each message/delivery-status block's Final-Recipient, Action, Status and Diagnostic-Code, the returned message/rfc822 or text/rfc822-headers Message-ID and Subject, X-Failed-Recipients as a fallback), ticketMailAutoHeaders() and ticketMailAnswersLeft() (TICKET_MAIL_ANSWERS_AN_HOUR, counted from email_headers like auto-replied). - cron/ticket_email_parser.php: bounces go to addBounce() right after the own-address check, and step 6 is now only unknown senders. addReply() sorts the sender into contact (the ticket's or the client's), agent, watcher or stranger, takes $email from_name and automatic, keeps a closed ticket's or an automatic reply's email as an Internal note (ticket_reply_by 0), and answers only a contact or watcher, never anything automatic, within ticketMailAnswersLeft(). addTicket() returns the ticket id, takes $automatic and acknowledges only a person's email; the fuzzy step replies only for the ticket's contact or a watcher and otherwise links the new ticket with linkSimilarTicket() (ticketLinkTogether(), as The email parser). emailQueue() and ticketMailSend() take auto (replied or generated); MAIL_QUEUE_HEADERS is now name => pattern and allows Auto-Submitted and X-Auto-Response-Suppress. The ack ("how" email), ticketMailClosedReply(), ticketMailColleaguesNew() and ticketMailRelayClientReply() send them. - Database 4.2.7: ticket_replies.ticket_reply_from_name and ticket_reply_from_email, set on a client reply from a watcher (ticketReplyFromReady()). ticketReplyAuthorSql() selects COALESCE(contact_name, ticket_reply_from_name, ticket_reply_from_email) AS contact_name in every reply query that names a client reply - the ticket page, quick look, split, pulse, project and email history, AI summaries, the portal and the guest page. Try an Email (functions/ticket_mail_try.php) follows: a bounce address first, automatic replies as a note or set aside, watchers as client replies, closed tickets as notes, and near-same subjects from someone else linked. +- Watchers are CCs in every page, email, ticket history line, log and message. The code, the ticket_watchers table and the API keep the watcher names for now. ## [26.12.2] diff --git a/admin/modals/ticket_status/ticket_status_form.php b/admin/modals/ticket_status/ticket_status_form.php index 487df1914..7f96ffeca 100644 --- a/admin/modals/ticket_status/ticket_status_form.php +++ b/admin/modals/ticket_status/ticket_status_form.php @@ -152,7 +152,7 @@ $s_reply_value = $s_reply_to && isset($s_reply_choices["to-$s_reply_to"]) ? "to-
- An agent moving a ticket into this status before anyone has answered the client meets - or misses - the SLA's response target then: setting it by hand or in a reply, or assigning a new ticket, which moves it to Open. Once per ticket. With the email, the contact and watchers get the "ticket assigned" message from Settings > Tickets, kept on the ticket as a public note; if nobody could be emailed, it doesn't count. + An agent moving a ticket into this status before anyone has answered the client meets - or misses - the SLA's response target then: setting it by hand or in a reply, or assigning a new ticket, which moves it to Open. Once per ticket. With the email, the contact and CCs get the "ticket assigned" message from Settings > Tickets, kept on the ticket as a public note; if nobody could be emailed, it doesn't count.
diff --git a/admin/settings_notification.php b/admin/settings_notification.php index 2fc4e6f0f..de7c6343f 100644 --- a/admin/settings_notification.php +++ b/admin/settings_notification.php @@ -58,7 +58,7 @@ echo settingsPageStart('notification');
Mail sending is off, so none of these go. Set up sending
- 'The contact and watchers on a ticket hear when it is raised, scheduled, resolved and closed, and colleagues when one is raised at their company. Off, they still get the replies an agent sends.']) ?> + 'The contact and CCs on a ticket hear when it is raised, scheduled, resolved and closed, and colleagues when one is raised at their company. Off, they still get the replies an agent sends.']) ?> 'Each recurring invoice set to send itself goes to the client\'s primary and billing contacts. Off, they are made as drafts to check and send.']) ?> diff --git a/admin/settings_ticket.php b/admin/settings_ticket.php index 49ec679b2..6ced016f9 100644 --- a/admin/settings_ticket.php +++ b/admin/settings_ticket.php @@ -45,7 +45,7 @@ echo settingsPageStart('ticket'); [' . escapeHtml($config_ticket_prefix) . '123] Subject, the same from the first to the last, and carries the headers a mail program keeps a conversation together by - so they stay together in the client\'s inbox, and a reply finds its ticket even when its subject was changed.') ?> - 'An email about a ticket goes to its contact with the watchers, and the colleagues who asked for every update, copied in (Cc) - everyone sees who else has it, and a reply to all reaches them. Off, each gets an email of their own.']) ?> + 'An email about a ticket goes to its contact with the CCs, and the colleagues who asked for every update, copied in - everyone sees who else has it, and a reply to all reaches them. Off, each gets an email of their own.']) ?> 'When the client replies - by email, text or in the portal - the people an agent\'s reply would go to get it too, with its files, unless it was already to them. By email, only a reply to one of the ticket\'s emails: anyone can put a ticket number in a subject.']) ?> @@ -121,7 +121,7 @@ echo settingsPageStart('ticket'); }), 'ticket_status_name'); ?> [Ticket], [Subject], [Contact], [First Name], [Client], [Agent], [Ticket Link], [Date] and the others canned responses take. The email greets each person by name, so the message needn\'t.', 'messages') ?> 5, 'maxlength' => 5000, - 'help' => 'Emailed to the contact and watchers when an agent moves a ticket nobody has answered yet into a status that counts as the first response by emailing the client - set in Ticket Statuses. It is kept on the ticket as a public note. [Agent] is who it is assigned to. ' + 'help' => 'Emailed to the contact and CCs when an agent moves a ticket nobody has answered yet into a status that counts as the first response by emailing the client - set in Ticket Statuses. It is kept on the ticket as a public note. [Agent] is who it is assigned to. ' . ($assigned_sent_by ? 'Sent on moving into ' . escapeHtml(implode(', ', $assigned_sent_by)) . '.' : 'No status sends it yet.')]) ?> 7, 'maxlength' => 5000, diff --git a/agent/dispatch.php b/agent/dispatch.php index d74e8c9da..593d65c4d 100644 --- a/agent/dispatch.php +++ b/agent/dispatch.php @@ -198,7 +198,7 @@ $tell_client = intval($config_ticket_client_general_notifications) === 1;
- +
diff --git a/agent/js/dispatch.js b/agent/js/dispatch.js index 342f4956d..cc8803cf2 100644 --- a/agent/js/dispatch.js +++ b/agent/js/dispatch.js @@ -345,7 +345,7 @@ if (!canEdit) { return; } - confirmBox('Take ' + (ticket.reference || 'it') + ' off the schedule?', 'The agent - and the contact and watchers, when client emails are on - are sent the cancellation. It goes back to the queue.').then(function (ok) { + confirmBox('Take ' + (ticket.reference || 'it') + ' off the schedule?', 'The agent - and the contact and CCs, when client emails are on - are sent the cancellation. It goes back to the queue.').then(function (ok) { if (!ok) { refreshBoard(); return; diff --git a/agent/modals/ticket/ticket_add.php b/agent/modals/ticket/ticket_add.php index f4b39ba25..d60abb8f0 100644 --- a/agent/modals/ticket/ticket_add.php +++ b/agent/modals/ticket/ticket_add.php @@ -420,7 +420,7 @@ ob_start();
- +
diff --git a/agent/modals/ticket/ticket_edit_schedule.php b/agent/modals/ticket/ticket_edit_schedule.php index cdb56fd42..478fb3a08 100644 --- a/agent/modals/ticket/ticket_edit_schedule.php +++ b/agent/modals/ticket/ticket_edit_schedule.php @@ -98,7 +98,7 @@ ob_start(); @@ -1891,7 +1891,7 @@ if (isset($_GET['ticket_id'])) { - Add Watcher + Add CC
@@ -1904,7 +1904,7 @@ if (isset($_GET['ticket_id'])) {
-
Nothing linked yet. Use to add an asset, vendor, project, service or watcher.
+
Nothing linked yet. Use to add an asset, vendor, project, service or CC.
@@ -2007,7 +2007,7 @@ if (isset($_GET['ticket_id'])) { ['group' => 'Tickets - to clients', 'label' => 'Ticket opened for them', 'to' => 'The contact, with the watchers copied in', 'when' => 'An agent opens a ticket for a contact', + 'ticket_created' => ['group' => 'Tickets - to clients', 'label' => 'Ticket opened for them', 'to' => 'The contact, with the CCs copied in', 'when' => 'An agent opens a ticket for a contact', 'run' => function ($s) { ticketMailCreated($s['ticket']); }], @@ -177,17 +177,17 @@ function emailPreviewCatalog() { 'pick' => 'contact', 'run' => function ($s) { recurringTicketRaise($s['recurring'], 'Preview'); }], - 'ticket_reply' => ['group' => 'Tickets - to clients', 'label' => 'Reply', 'to' => 'The contact, with the watchers copied in', 'when' => 'An agent replies publicly', + 'ticket_reply' => ['group' => 'Tickets - to clients', 'label' => 'Reply', 'to' => 'The contact, with the CCs copied in', 'when' => 'An agent replies publicly', 'run' => function ($s) { ticketMailReply($s['ticket'], $s['reply'], $s['by']); }], - 'ticket_resolved' => ['group' => 'Tickets - to clients', 'label' => 'Resolved', 'to' => 'The contact, with the watchers copied in', 'when' => 'An agent resolves a ticket', + 'ticket_resolved' => ['group' => 'Tickets - to clients', 'label' => 'Resolved', 'to' => 'The contact, with the CCs copied in', 'when' => 'An agent resolves a ticket', 'run' => function ($s) { global $mysqli; mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 4, ticket_resolved_at = NOW() WHERE ticket_id = " . intval($s['ticket'])); ticketMailReply($s['ticket'], $s['reply'], $s['by'], true); }], - 'ticket_closed' => ['group' => 'Tickets - to clients', 'label' => 'Closed', 'to' => 'The contact, with the watchers copied in', 'when' => 'A ticket is closed, by an agent or after it was resolved', + 'ticket_closed' => ['group' => 'Tickets - to clients', 'label' => 'Closed', 'to' => 'The contact, with the CCs copied in', 'when' => 'A ticket is closed, by an agent or after it was resolved', 'run' => function ($s) { global $mysqli; mysqli_query($mysqli, "UPDATE tickets SET ticket_status = 5, ticket_resolved_at = NOW(), ticket_closed_at = NOW() WHERE ticket_id = " . intval($s['ticket'])); @@ -201,7 +201,7 @@ function emailPreviewCatalog() { AND ticket_reply_type = 'Client' ORDER BY ticket_reply_id DESC LIMIT 1"))[0] ?? 0); ticketMailRelayClientReply($s['ticket'], $reply_id, $s['alex_name'], $s['alex_email']); }], - 'ticket_watcher' => ['group' => 'Tickets - to clients', 'label' => 'Made a watcher', 'to' => 'The new watcher', 'when' => 'An agent adds a watcher and asks to tell them', + 'ticket_watcher' => ['group' => 'Tickets - to clients', 'label' => 'Added as a CC', 'to' => 'The new CC', 'when' => 'An agent adds a CC and asks to tell them', 'run' => function ($s) { ticketMailWatchersAdded($s['ticket'], [$s['jamie_email']], $s['by']); }], @@ -213,9 +213,9 @@ function emailPreviewCatalog() { 'run' => function ($s) { ticketMailTaskApproval($s['approval'], $s['by']); }], - 'ticket_scheduled' => ['group' => 'Tickets - to clients', 'label' => 'Work booked', 'to' => 'The contact, with the watchers copied in and a calendar file', 'when' => 'An agent schedules the work', + 'ticket_scheduled' => ['group' => 'Tickets - to clients', 'label' => 'Work booked', 'to' => 'The contact, with the CCs copied in and a calendar file', 'when' => 'An agent schedules the work', 'pick' => 'contact', 'run' => $ticket_schedule], - 'ticket_schedule_cancelled' => ['group' => 'Tickets - to clients', 'label' => 'Booked work cancelled', 'to' => 'The contact, with the watchers copied in and a calendar file', 'when' => 'An agent cancels the scheduled work', + 'ticket_schedule_cancelled' => ['group' => 'Tickets - to clients', 'label' => 'Booked work cancelled', 'to' => 'The contact, with the CCs copied in and a calendar file', 'when' => 'An agent cancels the scheduled work', 'pick' => 'contact', 'run' => function ($s) use ($ticket_schedule) { $ticket_schedule($s); emailCaptureStart(); // only the cancellation diff --git a/functions/settings.php b/functions/settings.php index f07a17497..5ed9bd914 100644 --- a/functions/settings.php +++ b/functions/settings.php @@ -264,10 +264,10 @@ function settingsFields() { 'config_ticket_next_number' => ['page' => 'ticket', 'section' => 'Numbering', 'label' => 'Next ticket number', 'words' => 'ticket number counter'], 'config_ticket_email_parse' => ['page' => 'ticket', 'section' => 'Email to ticket', 'label' => 'Turn emails into tickets', 'words' => 'email to ticket parser parse inbound imap mailbox'] + $on_off, 'config_ticket_email_parse_unknown_senders' => ['page' => 'ticket', 'section' => 'Email to ticket', 'label' => 'From unknown senders too', 'words' => 'unknown senders domains anyone email'] + $on_off, - 'config_ticket_email_copy' => ['page' => 'ticket', 'section' => 'Emails about a ticket', 'label' => 'One email, with the watchers copied in', - 'words' => 'cc copy copied watchers one email each separate recipients reply all'] + $on_off, - 'config_ticket_email_relay' => ['page' => 'ticket', 'section' => 'Emails about a ticket', 'label' => 'Pass a client\'s reply on to the watchers', - 'words' => 'relay forward client reply watchers copied notify pass on'] + $on_off, + 'config_ticket_email_copy' => ['page' => 'ticket', 'section' => 'Emails about a ticket', 'label' => 'One email, with the CCs copied in', + 'words' => 'cc ccs copy copied watchers one email each separate recipients reply all'] + $on_off, + 'config_ticket_email_relay' => ['page' => 'ticket', 'section' => 'Emails about a ticket', 'label' => 'Pass a client\'s reply on to the CCs', + 'words' => 'relay forward client reply cc ccs watchers copied notify pass on'] + $on_off, 'config_ticket_sms_parse' => ['page' => 'ticket', 'section' => 'Text to ticket', 'label' => 'Turn texts into tickets', 'words' => 'text sms message mobile phone skyetel to ticket'] + $on_off, 'config_ticket_sms_unknown_senders' => ['page' => 'ticket', 'section' => 'Text to ticket', 'label' => 'From unknown numbers too', 'words' => 'text sms unknown numbers anyone'] + $on_off, 'config_ticket_sms_acknowledge' => ['page' => 'ticket', 'section' => 'Text to ticket', 'label' => 'Text back the ticket number', 'words' => 'text sms acknowledge reply confirm number'] + $on_off, diff --git a/functions/ticket.php b/functions/ticket.php index ea8aefc44..0b6810957 100644 --- a/functions/ticket.php +++ b/functions/ticket.php @@ -647,7 +647,7 @@ function ticketEmailContent(array $row, $kind, array $opts = []) { $email['summary'] = $summary + ($agent !== '' ? ['Assigned to' => $agent] : []); $email['history'] = ticketEmailHistory($row, ['limit' => 2, 'label' => 'What it is about', 'skip' => $email['content']]); } elseif ($kind === 'watcher') { - $email['kind'] = 'Watching'; + $email['kind'] = 'Copied in'; $email['title'] = 'You were added to a ticket'; $email['intro'] = ["$by added you to ticket $reference" . (!empty($row['client_name']) ? ' for ' . $row['client_name'] : '') . ", so you will get its updates. To add anything, just reply to this email."]; $email['message'] = ['html' => (string) $row['ticket_details'], 'label' => 'Details']; @@ -727,7 +727,7 @@ function ticketMailSend($ticket_id, array $email, array $opts = []) { if ($to_watchers) { $sql = mysqli_query($mysqli, "SELECT watcher_email FROM ticket_watchers WHERE watcher_ticket_id = $ticket_id"); while ($watcher = mysqli_fetch_assoc($sql)) { - $recipients[] = ['email' => trim((string) $watcher['watcher_email']), 'greet' => '', 'group' => 'watcher', 'footnote' => "You get this because you are watching ticket $reference - ask $company_name if you would like to stop."]; + $recipients[] = ['email' => trim((string) $watcher['watcher_email']), 'greet' => '', 'group' => 'watcher', 'footnote' => "You get this because you are copied in on ticket $reference - ask $company_name if you would like to stop."]; } // A new ticket reaches them by ticketMailColleaguesNew(), in an email of its own if ($kind !== 'created') { @@ -1007,7 +1007,7 @@ function ticketMailWatchersAdded($ticket_id, array $emails, $by) { } $company_name = (string) (billingCompany()['company_name'] ?? 'us'); return count(emailQueue(array_map(function ($watcher_email) use ($row, $company_name) { - return ['email' => $watcher_email, 'greet' => '', 'footnote' => "You get this because you are watching ticket " . ticketReference($row) . " - ask $company_name if you would like to stop."]; + return ['email' => $watcher_email, 'greet' => '', 'footnote' => "You get this because you are copied in on ticket " . ticketReference($row) . " - ask $company_name if you would like to stop."]; }, $emails), ticketEmailSubject($row), ticketEmailContent($row, 'watcher', ['by' => (string) $by]), ['from' => ticketEmailFrom(), 'thread' => intval($row['ticket_id'])])); } diff --git a/functions/ticket_mail_try.php b/functions/ticket_mail_try.php index bf17d4af7..6845af148 100644 --- a/functions/ticket_mail_try.php +++ b/functions/ticket_mail_try.php @@ -151,7 +151,7 @@ function ticketMailTry($from_email, $subject, $auto_reply = false) { } $steps[] = ['Tickets from unknown senders?', 'On']; return ['steps' => $steps, 'outcome' => ['fa-plus-circle', 'success', 'A new ticket with no client', - 'Open for an agent to give it a client. The sender is added as a watcher, so replies reach them. ' . ticketMailTryNoReply($from_email)]]; + 'Open for an agent to give it a client. The sender is added as a CC, so replies reach them. ' . ticketMailTryNoReply($from_email)]]; } /* @@ -176,7 +176,7 @@ function ticketMailTryReply($from_email, $ticket_id) { if (intval($ticket['ticket_status']) === TICKET_STATUS_CLOSED) { return ['fa-ban', 'warning', "A note on $reference - it is closed", 'Closed tickets aren\'t reopened by email: it is kept on the ticket as an internal note, and agents get a notice' - . ($known ? '. The sender is told it is closed, and how to raise a new ticket.' : '. The sender isn\'t a contact or watcher, so nobody is told - a guessed number would tell them its subject.')]; + . ($known ? '. The sender is told it is closed, and how to raise a new ticket.' : '. The sender isn\'t a contact or CC, so nobody is told - a guessed number would tell them its subject.')]; } $reopens = ticketMailTryReopens($ticket['ticket_status']); if (strtolower((string) $ticket['contact_email']) === $from_email && $from_email !== '') { @@ -192,10 +192,10 @@ function ticketMailTryReply($from_email, $ticket_id) { } $watcher = mysqli_num_rows(mysqli_query($mysqli, "SELECT 1 FROM ticket_watchers WHERE watcher_ticket_id = " . intval($ticket['ticket_id']) . " AND watcher_email = '$from_sql' LIMIT 1")); if ($watcher) { - return ['fa-reply', 'success', "A reply on $on", 'From one of its watchers, as the client\'s reply. ' . $reopens]; + return ['fa-reply', 'success', "A reply on $on", 'From one of its CCs, as the client\'s reply. ' . $reopens]; } return ['fa-user-secret', 'warning', "An internal note on $on, with a warning", - 'From someone who isn\'t a contact, a watcher or an agent - anyone can put a ticket number in a subject - so it is kept as a note marked as from a stranger, the ticket isn\'t reopened, and its attachments aren\'t added.']; + 'From someone who isn\'t a contact, a CC or an agent - anyone can put a ticket number in a subject - so it is kept as a note marked as from a stranger, the ticket isn\'t reopened, and its attachments aren\'t added.']; } /** What a client's reply by email does to the ticket's status, as a sentence. */ diff --git a/functions/ticket_reply_recipients.php b/functions/ticket_reply_recipients.php index c5df482c8..cbb84886b 100644 --- a/functions/ticket_reply_recipients.php +++ b/functions/ticket_reply_recipients.php @@ -26,7 +26,7 @@ const TICKET_REPLY_TO_MOST = 50; /** What each kind of person in the To line is - shown under their name. */ const TICKET_REPLY_TO_GROUPS = [ 'contact' => 'Contact on the ticket', - 'watcher' => 'Watcher', + 'watcher' => 'CC', 'colleague' => 'Asked for every update', 'agent' => 'Assigned agent', 'client' => 'Contact at the client', @@ -179,7 +179,7 @@ function ticketReplyRecipientsPick($ticket_id, array $posted, $remember = true) $company_name = (string) (billingCompany()['company_name'] ?? 'us'); $why = [ 'contact' => "You get this as the contact on ticket $reference with $company_name.", - 'watcher' => "You get this because you are watching ticket $reference - ask $company_name if you would like to stop.", + 'watcher' => "You get this because you are copied in on ticket $reference - ask $company_name if you would like to stop.", 'colleague' => "You get this because you asked for every update on $client_name's tickets - change that under Your account in the client portal.", 'agent' => "You get this because ticket $reference is assigned to you.", ];