19 Commits

Author SHA1 Message Date
johnnyq
b391e2ce6c Add Skyetel text messaging with two-way ticket texting, text to ticket for contacts, Text reply on tickets, a Texts inbox for unmatched numbers, verification codes and spam (codes masked, limited to credential access, every reveal audited, wiped after a day), STOP/START/HELP handling, a text log with retry and cancel in Maintenance > Text Messages, the Text Messages cron job, and texts to clients about their tickets, visits, visit reminders and invoices with per-contact opt-in from the contact, by text or in the client portal, quiet hours, and new settings in Tickets and Notifications (database 3.6.0 and 3.6.1) 2026-11-06 00:08:10 -05:00
johnnyq
b5ceeb4eaf Bill sign-ups through the API and follow up when an invoice is paid - a lead that pays an invoice in full becomes a client however it is paid (online, autopay, a recorded payment or a batch), with the new A lead that pays an invoice becomes a client switch in Admin > Settings > Invoices and billing, on by default; a non-billable open ticket tied to an invoice (one raised through the API with ticket_invoice_id, or a quote's tickets once it becomes the invoice) gets an internal note when the invoice is paid in full, goes from On Hold back to Open, and its assigned agent is notified in the app and by email, while billable tickets whose time is on an invoice are left alone; new API endpoints recurring_invoices/create (lines from products or spelled out, the client's currency, frequency, start date, optional first invoice made at once and emailed to the primary and billing contacts, or marked Sent so its link can be paid, the answer including the invoice reference, amount, due date and pay link), recurring_invoices/read and portal_invites/create (sent from the company rather than the key's agent); tickets/create takes ticket_status (an active status other than Resolved and Closed), ticket_invoice_id (one of the client's own invoices) and ticket_notify agents to tell only the team; database 3.5.9 adds settings.config_invoice_paid_lead_to_client; invoicePaidFollowUp() runs from triggerCustomAction() on invoice_pay, with recurringInvoiceCreate(), billingInvoiceIssue() and the paid kind of ticketAgentEmailContent() in support; the Clients list reads each contract's term, so Renews soon shows again and its PHP warning is gone; changelog updated 2026-11-05 19:00:16 -05:00
johnnyq
294352fd8b Let the API raise a ticket from a ticket template - tickets/create takes ticket_template_id, giving the ticket the template's subject and details when none are sent, its category, priority, billing and agent unless sent, and its tags, due time and tasks (the ones the answers call for), with the template's fill-ins answered from ticket_fill_ins and its placeholders filled in, and a missing or archived template, fill-ins that aren't an object, a required fill-in left out or a choice not on a list refused with 400 and the reason; ticket_notify sends the contact and watchers the Ticket Created email when Email clients about their tickets is on, tells the new-ticket address and notifies the assigned agent in the app and by email; the answer now includes ticket_reference, ticket_url (the contact's link to the ticket) and, from a template, ticket_tasks; canned responses now fill in a ticket's template fill-in answers such as [Hostname] alongside [Contact] and [Ticket], never over a built-in placeholder of the same name, and the canned response form says so; contacts/create and locations/create no longer write a PHP warning for each field left out; the new-ticket agent email reads raised through the API; changelog updated 2026-11-05 17:39:22 -05:00
johnnyq
3c996a0b4b Add agent mentions in ticket internal notes: typing @ in an internal note (reply box and Edit reply) offers the agents who can open the ticket by role and client access, each mention is saved with the agent's current name and told in ITFlow with a link to the note and by email from the ticket mailbox, the ticket shows Mentions you with the name highlighted, a Mentioned me view on the tickets list and board lists open tickets with a note that mentions you, edits tell only newly added agents and drop removed ones, redacting and archiving take mentions off, mentions in public notes, email replies and bulk replies stay plain text and tell nobody, database 3.5.3 adds ticket_reply_mentions, and the Mentioned in a note email is added to Mail Previews 2026-10-28 14:19:15 -04:00
johnnyq
6e03857c6c Show whether each ticket reply was emailed and who to: replies are marked Email reply, Public note or Internal, an email reply lists each recipient with their email's state from the mail queue (sent, waiting, retrying, failed with why, cancelled) and a Mail Queue link for admins, sending says how many it went to or why it didn't go, and editing an emailed reply says the client keeps what was sent; database 3.4.8 adds ticket_replies.ticket_reply_emailed and ticket_reply_emailed_to and email_queue.email_ticket_reply_id, matching the mail queue's update and resolved emails to their replies; bulk reply, bulk resolve and the API record it too 2026-10-26 12:51:28 -04:00
johnnyq
0f9038b1ed Contracts stage 3: prepaid hours - hours included each month, and blocks bought with a price, expiry, note and an optional draft invoice; a nightly draw of billable ticket time, oldest ticket first from the hours that run out first, with Draw now and Put back, and a ticket the hours run out on staying in Unbilled Time at the usual rate; Prepaid hours card, a low hours email to the owner, and hours left on the contracts list, client overview, ticket, Unbilled Time and the client portal; [Monthly Hours] placeholder; new functions/contract_hours.php; DB 3.4.4 adds monthly hours and the alert level to contracts and templates, plus contract_blocks and contract_block_uses 2026-10-25 01:06:27 -04:00
johnnyq
96076d295e Ticket emails carry the conversation: the new message first, then earlier public replies newest first and the request, as short plain-text excerpts without pictures, cut when long, with the rest counted after four, never internal notes, archived replies or the portal's resolve, reopen and close lines; resolved, closed, work booked, watcher added, assigned to you, client replied and the SLA alerts all carry it, so resolving with the Resolve button or on the board no longer sends an empty Resolved email; the inbox preview line is the start of the message or what happened instead of the number and subject; the new ticket email to a client's colleagues shows what was asked for portal and agent tickets but never an emailed ticket's words, and the emailed-ticket confirmation still doesn't repeat them; the email parser cuts a plain-text reply at the reply line too; adds emailPlainText, ticketEmailHistory, ticketEmailExcerpt and ticketEmailPreview and a history block in emailHtml; changelog 2026-10-24 13:27:48 -04:00
johnnyq
9a793bee98 Guest ticket page rebuilt to match the client portal's ticket: logo, status badge and progress, conversation oldest first with each message's files, details, request details and a Contact us panel; shows when you will reply while the SLA response time is still ahead, work booked on the ticket (onsite with the site's address, or remote) with Add to calendar, and tasks waiting for client approval; Reply by email with the ticket number in the subject when the ticket mailbox is parsed, Reply in the client portal, and Call on Urgent and High tickets; close, reopen and rating are now form posts that act once, reopen restarts the resolution SLA and notifies agents, close stops the SLA clock, and the rating takes Good or Bad only and only once; the link key must match exactly, the page sends no referrer and can't be framed, files come through new guest_ticket_attachment.php with the portal's rules and download logging, never the parsed email; fixes contact photos not showing and the rating custom action never running; adds ticketByGuestKey, ticketGuestPath, ticketScheduleRow and ticketScheduleIcs, which ticketSetSchedule now uses for its calendar file; changelog 2026-10-24 12:55:22 -04:00
johnnyq
ea23a2bad5 Audit logs stage 1: Admin > Audit Logs rebuilt on the standard list with search, sortable columns and paging, filters for date, who (agent, portal contact or ITFlow itself), client, type and action, and counted views for Changes, Deletions, Sign-ins, Security and Data out; each entry shows who with their avatar, the client, the type and action as a coloured label, the description without the name in front, the IP and device in words, and links to its record while it exists or says No longer here; a quick look with the full entry, the raw user agent, everything from that IP, the record's other entries and what the same person did 15 minutes either side; CSV/PDF export with the page's filters, view and picked columns, itself audited; new functions/audit_log.php, admin/modals/audit_log/audit_log.php and audit_log_export.php, admin/post/audit_log.php and audit_logs export columns; agent/files.php takes ?open= for a file's quick look; database 3.3.1 adds log_client_id and log_entity_id keys on logs, gives each action one name (Unarchive/Restored to Restore, Deleted, Merged, Closed, Reopened, Resolved and Sent to Delete, Merge, Close, Reopen, Resolve and Send, Client Access to Denied, saved card and payment provider Updates to Create or Delete, contract template Update to Edit, type client to Client) and repoints entries at the right record (reply edits and redactions to the ticket, API document edits to the document, reimbursements to the recording expense, API client restores to the client), guarded so it can run again; logAudit call sites in agent, admin, api, client, cron and functions use the same names and record ids 2026-10-18 22:36:25 -04:00
johnnyq
3dc1205a55 Ticket templates stage 2: fill-ins - words in square brackets other than the ones filled in from the ticket, like [Employee Name] or [Start Date], are asked for when a ticket is raised from a template on New Ticket, once for all tickets in the New Tickets windows of the assets and clients lists, and once on a recurring ticket for every ticket it raises, then filled in wherever they appear in the subject, details and tasks and kept on the ticket in a Fill-ins card where a blank one can be answered later and goes in where it is still waiting, with each change in the ticket's history; on the template's page each fill-in can be made text, a date, a list of choices or yes or no, required, given help, renamed along with its text and tasks, added without being in the text, and dragged into order (migration 3.2.0 adds ticket_template_fill_ins, ticket_fill_ins and recurring_ticket_fill_ins, and task_templates.task_template_when_fill_in and task_template_when_value); a template's task can be for one answer only, dropping out of New Ticket as answers are given and kept when its answer is not given or no longer offered; project template tickets keep their fill-ins unanswered to answer on the ticket; addTasksFromTicketTemplate replaced by ticketTemplateAddTasks; fixes Add Task adding a row for every time the New Ticket or recurring ticket window had been opened, and Save doing nothing when a required field was empty on a tab that was not showing; changelog updated 2026-10-18 00:44:01 -04:00
johnnyq
3f90d2b0d0 Ticket templates stage 1: templates now set up the whole ticket - category, priority, billable, agent, due time and tags (migration 3.1.9 adds them, the ticket_template_tags table and tickets.ticket_template_id) - and fill [Client], [Contact], [Asset], [Site], [Agent], [Project], [Ticket], [Date], [Month], [Quarter] and [Year] in the subject, details and tasks when a ticket is raised, leaving other bracketed text for whoever picks it up; tickets remember the template they came from and each template shows how many tickets it raised, how many are open and when it was last used; the template picker fills New Ticket, the New Tickets windows on the assets and clients lists and recurring tickets, and project templates use each template's setup and agent; Admin > Ticket Templates rebuilt with search, Current/Archived, Copy, Archive/Restore and New ticket from it, and each template gets a page showing the ticket it starts, its tasks in drag-to-sort order with time estimates, what it sets up, its placeholders and the tickets, recurring tickets and project templates that use it; template handling moved into functions/ticket_template.php with ticketTemplateFinish, tagKeepIds and tagIdsFromValues split out of tagSetForRecord, and template task editing moved to admin/post; fixes editing a template task moving it to the top of the list, client bulk tickets skipping the template's tasks and time estimates, and the client bulk window not validating the agent, priority and category, and adds an option there to raise each client's ticket for its primary contact; changelog updated 2026-10-18 00:01:43 -04:00
johnnyq
9457442804 Emails stage 3: every email now goes through emailQueue and the shared layout - the client portal invite sends a link to set a password (or to sign in with Microsoft) instead of the password itself, offered on New Contact as well as Edit through portalMailInvite, with Forgot password, password changed and two-step sign-in emails through portalMailPasswordReset and portalMailAccountChange; shared link and code emails with the note quoted and the whole link printed under the button, replacing shareMailHtml and shareQueueMail; calendar invitations, updates and cancellations with when, repeats, where, the description and a join button; Email on the contacts and clients lists in the layout from one of the configured mailboxes with an optional greeting and send time, leaving out archived contacts and contacts without an address, each address once, nothing queued without mail set up, through emailBulkSend and emailBulkPost with a shared bulk_email_fields window; Admin > Mail > Previews shows all 52 emails built by their real senders on sample records inside a rolled-back transaction with emailQueue capturing and custom actions off, with computer and phone widths and Send me a copy; emailHtml gains content and button show_url, emailQueue gains queued_at and always so billing still queues as before, plus emailMailboxes and emailTestSend; ticketMailCreated, ticketMailReply, ticketMailWatchersAdded, ticketMailTaskApproval, ticketMailClosedReply, ticketSlaAlert and billingMailCardSaved moved into functions; fixes Email on the contacts list queuing mail to contacts with no address, the clients list including archived contacts, and both taking any From address posted; changelog updated 2026-10-17 23:26:25 -04:00
johnnyq
0a4aabbf9a Emails stage 2: agent and staff emails in the shared email layout with an Open in ITFlow button - assigned to you (assignee pick, Bulk Action, New Ticket and Edit, several at once as one list, recurring tickets the same way, nothing when assigning yourself), new ticket to the new-ticket address (portal, email or scheduled, with what they wrote), client replied to the assigned agent (portal or email, with the reply), SLA at risk and missed to the SLA alert address and the assigned agent, scheduled work and its cancellation to the agent, contact and watchers with the calendar file, a new agent's sign in details, account changes, new device and failed MFA sign in alerts, a login sent back through a shared link, the Admin > Mail test email and the portal's saved card confirmation; nothing is queued when outgoing mail is not set up; fixes backslashes before apostrophes in the parser's new ticket and reply emails, emails skipped when no SMTP host was set for Microsoft 365 or Google mail, and the saved card email's wording; adds emailSettings(), emailReady() and cal_str to functions/email.php, the ticket agent email functions, userMailNewAccount() and userMailSignInAlert(), a new sendSlaAlert() signature, removes userQueueMail() and updates the changelog 2026-10-17 22:47:52 -04:00
johnnyq
5f88ce4f8a Emails stage 1: one email layout for everything ITFlow sends in new functions/email.php, with emailHtml carrying the billing look plus the reply line kept first, inbox preview text, a quoted message block made safe through documentHtmlPurify with images pointed at the install, a callout and a contact line, emailFrom reading the sender from the settings as saved, and emailQueue escaping raw values for the mail queue with a greeting and footnote per recipient, billingEmailHtml now a wrapper so billing emails are unchanged; ticket emails to clients rebuilt on it through ticketEmailContent and ticketMailSend, replacing ticketMailContactAndWatchers, ticketMailCompany and getTicketSlaEmailNotice, covering a ticket opened by an agent, on a schedule or from an email, replies, resolved with when it closes and a reopen button, closed with a feedback button, watcher added, the reply to a closed ticket, public replies through the API, bulk reply and bulk resolve, and task approval requests, each saying why the recipient gets it instead of the collaborator block, new tickets showing the SLA response time and asking Urgent and High tickets to phone, subjects unchanged so threading and parsing keep working; tickets auto-closed by the nightly run now send the closed email when client notifications are on; fixes scheduled tickets never emailing the contact or the new-ticket address because recurringTicketRaise did not load those settings, and a backslash before apostrophes in the subject and sender name of the emailed-ticket reply; changelog updated 2026-10-17 22:19:44 -04:00
johnnyq
e29369926f Client portal stage 4: accounts - Your account rebuilt with details and an ask-us link, phone numbers, ticket email choices, password change needing the current password and 8 characters with an email notice, two-step sign-in with an authenticator app set up from a QR code, remembered browsers with Forget them, phone PIN and recent sign-ins with the device; activity rebuilt with signing-in and changes tabs and paging; sign-in asks portal users with two-step sign-in for a code, remembers the browser on request and locks an account after five wrong codes in ten minutes, matching portal users by contact_user_id; Admin > Client Portal can require two-step sign-in, sending anyone without it to set it up first, and agents can turn it off for a contact from the contact page; password links stored as SHA-256 and running out after an hour for Forgot password and a week for invites, the nightly run clearing only run-out links, Forgot password limited to one email per account every five minutes and ten requests per address in ten minutes, the reset page rebuilt with the password typed twice and a confirmation email, fixing the empty-token check that let anyone trigger the reset email; contacts choose every ticket email or replies and fixes only, and primary and technical contacts can hear about new tickets at their company or every update, honoured by agent, portal, email parser and recurring ticket emails; announcements for every client or one with tone and start and end dates on the portal home page, managed in Admin > Client Portal; View as contact opens the portal read only as a contact from the agent contact page, audited, with billing shown only when the agent's role reads sales and financial, nothing written or paid while viewing; agent contact page shows two-step status, last sign-in and ticket email choices; database 3.1.0 adds portal_announcements, contact ticket email columns and config_client_portal_require_mfa and hashes outstanding links; new functions/portal.php; changelog updated 2026-10-17 12:05:55 -04:00
johnnyq
c6eadf3fa3 Client portal stage 1, look, home and tickets: a new light shell with the company logo or initials on the theme colour, sections shown by what each contact may open (Home, Tickets, Billing for billing contacts, Your IT for technical contacts, custom links), New ticket and an account menu with a dark mode switch kept in a cookie, a bottom tab bar and slide-in menu on phones, and the welcome banner removed; a rebuilt home showing what needs the contact (tickets waiting on their reply or to confirm, approvals, past-due invoices), open tickets, balance with Pay invoices, renewals in the next 45 days, their devices with warranty status and the company phone and email; tickets rebuilt with Open, Waiting on you, Resolved, Closed and All tabs with counts, search, paging and the whole company's tickets for primary and technical contacts with a Mine filter, the old all-tickets page redirecting there; a ticket page with progress steps, the conversation oldest first, approvals, details alongside, replies with drag and drop attachments, It's fixed, close or reopen and rating; New Ticket with priority, category, device and attachments; fixes downloading files from internal notes, files on closed tickets not downloading, new tickets linking to another client's device or a non-ticket category, empty replies and tickets being accepted, PHP warnings on Pay invoices and Recurring invoices with no payment provider, and Bootstrap icons and the editor setup blocked by the portal CSP, which now allows data: images; new js/portal.js and portal helpers in client/functions.php, ticketPortalStatusHtml removed; changelog updated 2026-10-17 01:28:27 -04:00
johnnyq
9ff206af3d Trips modernized for MSP use: rebuilt trips list with stat cards, pills (mine, for a client, for a ticket, our own), driver/client/date filters, search across site and ticket, footer total, bulk Set Driver/Set Client/Delete and export with driver, round trip, one way, site, ticket and odometer columns; new trip quick look with route, Google Maps directions, driver, client, site and ticket links, odometer, logged by and trips to the site, with Edit, Copy, Return Trip and Delete; one shared form for New, Edit, Copy and Return Trip with client sites and tickets, site address as destination, ticket fills purpose and site, known routes fill miles, one way miles with round trip total and optional odometer readings; Log a trip and a Trips card on tickets, a Trips tab on locations, Mileage report rows open the trip and show site and ticket with Site and Ticket CSV columns; every agent can log and manage their own trips while others' trips need Financial write and deleting them Financial full; trips follow ticket merge, client move and ticket or location delete; new functions/trips.php and handlers rewritten around tripSave and tripDelete, trip_model.php removed; demo data links trips to sites and onsite tickets; database 3.0.3 adds trip_location_id, trip_ticket_id and trip_created_by with backfill, makes trip_miles decimal and renames trip_end_odmeter to trip_end_odometer; CHANGELOG updated 2026-10-16 19:48:32 -04:00
johnnyq
3ec52974db Calendar modernization: calendar page rebuilt to load only the dates on screen with show or hide toggles for each calendar and for built-in sources (scheduled tickets, project start and due dates, service reviews, recurring tickets, renewals, invoices due), a filter for one agent, quick looks on click, drag to reschedule tickets and events that do not repeat, and a To schedule panel for dragging open unscheduled tickets onto the calendar; events get a shared add/edit form with repeats every N days/weeks/months/years with an optional end date and single skipped occurrences, a client site, location or meeting link, agents, client contacts and guest emails as attendees, iCalendar invitations with updates and cancellations sent to invited attendees, an event quick look with map and join links, .ics download and resend; each agent gets a personal subscription link for their schedule (their own or the whole team, busy only option, respects role and client access, stops when the account is disabled) with setup help for Google, Outlook, Apple, Nextcloud and Thunderbird; shared calendar feeds and invites now publish timed events with TZID and VTIMEZONE so repeating events keep their time across DST, with INTERVAL, UNTIL and EXDATE support; managing calendars is limited to admins; ticket schedule logic moved into functions/ticket.php and shared with the calendar, the schedule dialog shows the assigned agent's day, and ticket visit calendar files are rebuilt without zapcal as one-hour published events; mail queue sends invitations and cancellations as a text/calendar part and other calendar files as invite.ics; dashboard schedule shows only events the agent is on or added, client overview Coming up and client sidebar count use upcoming events, sites and contacts get New event shortcuts, demo data uses repeating events and attendees; database update 2.8.8 adds event repeat interval, until, skip, sequence and created by, attendee user and invited at, user_calendar_feeds, and widens email_queue.email_cal_str to text 2026-10-15 19:17:17 -04:00
johnnyq
64d938db7f Tickets modernization: list redesign with Open/Mine/Unassigned/Needs reply/Waiting/Overdue/Scheduled/Closed/All views, whose-move indicator, SLA and due badges, in-row status/priority/agent pickers, collapsible filters and phone layout; kanban board redesign with drag-to-resolve/reopen rules and dark mode; new ticket quick look modal; New Ticket modal with asset/contact prefill and already-open warning; Edit Ticket modal rework; recurring tickets list rework with pause/resume, raise now, plain-language schedules, next-run preview and bulk actions, cron skips paused and raises missed runs once; shared ticket tables on asset/contact/location/vendor/project pages; Also open card on ticket detail; portal waiting-on-your-reply status; merge limited to same client; closed tickets no longer editable from modals or API; consistent access checks across ticket modals, post handlers and ajax endpoints; new functions/ticket.php helpers; removed recurring_ticket_model.php; DB 2.8.5 adds recurring_ticket_paused_at and cleans orphaned recurring ticket rows 2026-10-15 15:29:10 -04:00