Commit Graph

436 Commits

Author SHA1 Message Date
johnnyq
ae468d6cee Encrypted backups with types, scheduling and CLI restore
Backups are now AES-256 encrypted zips in three types (full, database
only, master key), catalogued in a new backups table, built by cron rather
than the web request, and kept under uploads/backups with retention in the
nightly job. The encryption key is one value per install held in config.php,
never in the database and never in the file name.

Restore is shared by the setup wizard and the new scripts/restore_cli.php,
which is the only path without an upload size limit. It verifies the key and
unpacks the archive before dropping anything, and dumps the current database
first so a failed import is rolled back.

A backup dumps, zips and encrypts for minutes without issuing a query, so on
a server with a short wait_timeout the connection is closed underneath it and
the UPDATE marking the backup complete is what fails - long after the archive
was written correctly. The connection is now held open for the job and
re-established before any write that follows long file work, including the
database phase of a restore. Retention recovers rows a dropped connection
left behind: still Running after six hours becomes Complete if the archive is
on disk, Failed if it is not.

cron.php's own failure path is hardened to match. It recorded job failures
through the same connection the failing job had just killed, so an uncaught
exception ended the dispatch and no trace of the original error survived.
Failures now also echo to stdout, so cron mails something useful when the
database is unreachable.

Security: the setup wizard's restore step is now closed on any install that
has users, whatever config.php says. $config_enable_setup defaulted to
enabled when the flag was absent, and the flag is only written at the end of
a successful install, so an install abandoned partway left an unauthenticated
endpoint that would drop every table, import an attacker-supplied archive,
and overwrite uploads/ including the .htaccess that stops PHP running there.
Affects 26.07 and earlier. Restoring over a live install is now CLI only.
2026-07-31 16:18:20 -04:00
johnnyq
6a5cf6704a Add Indexes to foreign key in ticket replies and attachments fixes slow ticket access issue with many replies with large inline images 2026-07-31 14:16:19 -04:00
johnnyq
36c9c030c0 DB Update 2026-07-30 17:07:38 -04:00
johnnyq
119334ab71 Cron Fix 2026-07-30 16:44:56 -04:00
johnnyq
38e8edea19 Cron runs all jobs from a single dispatcher cron.php which should now be run every minute and all other cron jobs eliminated from cron 2026-07-30 13:48:39 -04:00
johnnyq
1005b73416 DB Structure Update 2026-07-30 02:30:15 -04:00
johnnyq
f2d5ac4a29 Feature: Calendars are now exportable shareable so Third Party Calendar services can read them, also added recoccurence to calendar, and all day along with sperating the time fields and click in a box to add calendar event is possible 2026-07-30 02:18:30 -04:00
johnnyq
2395a3ee16 Phase 2 of ticket attachements by agents 2026-07-29 18:10:34 -04:00
johnnyq
e74307eaea Feature: Add Dynamic Task editing in add ticket and add recurring ticket, recurring tickets now have their own task table as well 2026-07-29 17:48:41 -04:00
johnnyq
7245ff0650 Fix Cron URL Key on recurring tickets 2026-07-29 16:11:36 -04:00
johnnyq
bc64c9e3d1 Feature: Abiliry to assign Ticket Templates to Recurring Tickets 2026-07-29 15:55:14 -04:00
johnnyq
a900b2cd74 Update DB Structure 2026-07-29 14:15:15 -04:00
johnnyq
750c2e58cc Update DB Structure 2026-07-29 13:23:02 -04:00
johnnyq
cc651c18be DB Structure Update 2026-07-29 13:04:05 -04:00
johnnyq
162a597da9 Add SLA pausing, SLA reports, SLA filtering and kanban SLA state (phase 3)
Statuses can be flagged to pause the resolution clock; sla_history records the intervals a ticket's clock actually ran and the deadline is re-based on remaining budget when it resumes. Adds SLA Summary and SLA by Client reports, an SLA state filter on the ticket list, SLA colouring on kanban cards, and an Urgent column on the Tickets by Client report. DB update 2.5.1. Also fixes resolution SLA verdicts being skipped when resolving via kanban or the client portal.
2026-07-29 13:02:27 -04:00
johnnyq
dd45a0f4f1 Update DB Structure 2026-07-29 00:03:08 -04:00
johnnyq
d08ef6184a Add optional ticket SLAs
Response/resolution targets stamped at creation from per-client/priority assignments, business-hours due date math, warn/breach alert stages via cron/ticket_sla.php, ticket list coloring, per-ticket SLA override, admin page for plans/assignments/business hours. DB update 2.5.0. No behavior change unless SLAs are assigned. Bulk reply now only counts Public replies as first response.
2026-07-29 00:00:42 -04:00
johnnyq
78ee38b39f Revert DB Update 2026-07-28 22:08:01 -04:00
johnnyq
31921ee99b Add Refunding capability along with Stripe Refunding 2026-07-28 21:34:06 -04:00
johnnyq
8825661360 Dump new DB Structure 2026-07-27 18:38:48 -04:00
johnnyq
c509b7f693 Add user-based RBAC for API keys
API keys now run as a user and inherit that user's module, operation, and client permissions. Drops per-key client scoping and removes existing keys (must be recreated). Adds an edit modal to change a key's user.
2026-07-25 16:50:58 -04:00
johnnyq
3756561458 Feature: Add Deny Client Access to Client Access Permssions - BREAKS UI, MUST UPDATE DB USING php scripts/cli_update.php --db_update 2026-07-25 13:22:52 -04:00
johnnyq
fad62ca045 Remove custom_hosting tables 2026-07-22 17:36:55 -04:00
johnnyq
5402578ce6 Remove Static payment processing fees from database and update field hints with useful info when adding / editing payment provider 2026-07-22 17:32:01 -04:00
johnnyq
e7ed88e10e Remove custom_hosting tables from db.sql 2026-04-04 18:14:13 -04:00
johnnyq
d8359e1049 Network Interface Types: Moved to creatable/editable Categories with common defaults 2026-03-30 15:24:09 -04:00
johnnyq
43dbc69358 Remove custom tables from db.sql 2026-03-14 12:25:15 -04:00
johnnyq
7f180eb6d9 Migrate Invoice Quote Recurring Invoice Items to their new respecting tables 2026-03-07 18:47:28 -05:00
johnnyq
72091670fd Bump DB to to include tables for quote items and recurring invoice item for future splitting of line items 2026-03-07 18:23:19 -05:00
johnnyq
65d1f59e9b Feature: Favorites added to assets, Bulk Fav/unfav, adds favs to client overview 2026-02-03 22:23:20 -05:00
wrongecho
77e4d2b566 Add task approval system 2026-01-09 17:14:44 +00:00
johnnyq
abb97ad99f [Feature] Added Asset Tags 2025-11-11 19:57:51 -05:00
johnnyq
ab46899e72 [FEATURE] Client Contracts, initial DB Schema, rates and net terms along with SLA Reponse / Resolution times will eventually be moved over to this 2025-11-07 16:49:35 -05:00
johnnyq
76c9933baf Update imap and smtp providers to allow empty string if empty do not execute mail queue 2025-10-02 14:28:43 -04:00
johnnyq
0d629221fe Add Software keys and software key assignment for contacts and assets table to the database schema 2025-09-25 17:24:42 -04:00
johnnyq
dc0715da57 Added SMTP Provider and the ability to share OAUTH keys with IMAP for M365 Mail Auth 2025-09-15 17:23:00 -04:00
johnnyq
3a5b18f3dd Added Beta support for Microsoft IMAP OAUTH2 must use new mail parser for it to work cron/ticket_email_parser.php 2025-09-12 15:56:44 -04:00
johnnyq
fd73f132bc Fixed a few table names in Stripe Migration, Removed legacy stripe and AI settings 2025-08-28 11:44:29 -04:00
johnnyq
595e6090c7 Added Stock Ledger to tables and additonal fields for product including type, code and location 2025-08-11 18:19:45 -04:00
johnnyq
08dd6147f2 Migrate Dark/light mode to a user settings instead of global setting, created new include called router.php to dynamically prepend ../../ to asset pathes based off currect directory depth 2025-08-05 13:32:19 -04:00
johnnyq
7cfba7f2ef Added redirect() function for page redirects and updated credit system fields to include credit_note, credit_invoice_id and type for better reporting 2025-08-01 13:37:23 -04:00
johnnyq
9fe0d8417b Feature: Added Client URI field to Assets which is exposed in the client portal can be used for remote desktop links etc 2025-07-31 15:54:07 -04:00
johnnyq
5a76780cd9 Move db.sql back to fix develop platform 2025-07-29 21:40:50 -04:00
johnnyq
95950700d8 Moved user items to user directory 2025-07-28 17:57:06 -04:00
johnnyq
e014e516e6 Beta Support for Dark Mode has been added to the theme options 2025-07-24 14:58:06 -04:00
johnnyq
197dd9f299 Initial Work on Client Account Credit System, DB Structure, Credit Balance Calculation, added Apply Credit and add Credit with Expire dates, Added DB Structure for Discount Codes, UI Rewrite on client top header now using grouped cards, more dark mode work as well 2025-07-24 11:31:45 -04:00
johnnyq
93f4ea51fd Rework Payment Provider AI Provider Tables and logic add cascading deletes 2025-07-08 14:07:10 -04:00
johnnyq
c76da10747 Add Payment Method to UI and switch Add Payment modals to use the new table 2025-07-07 16:37:51 -04:00
johnnyq
e7503e8f55 Initial DB work to Generalize Payment Providers, allow multiple payment providers and client payment methods, also to move payment methods to its own table instead of in categories, started work on ai provider ui models 2025-07-04 16:52:30 -04:00
johnnyq
9b6be66623 Initial work on Adding Payment Methods for Online Payments in Client on Agent Side and initial work on AI Providers with multiple model support assigned to various sections and custom prompts 2025-07-04 15:42:26 -04:00