Multi Admin Ticket Enhancement

Заказчик: AI | Опубликовано: 16.11.2025

My CodeIgniter-based support desk already separates Normal Users, Agents, Admins and a special “Client Admin” role. Today a User record carries only one client_admin_id. I now need full many-to-many support so that any single user can belong to several Client Admins (or “Client Groups”) at once. Core changes I expect • Database: introduce a junction table (user_client_admin or similar) and any necessary migrations so existing data remains intact. • Back-office UI: on the User-edit view swap the single-select for a multi-select dropdown (chosen-select2 or native) that lets me pick several Client Admins in one action. • Save logic: when I hit “Update”, newly picked admins are added; any already linked stay untouched. • Permissions: when a Client Admin signs in, the ticket list must aggregate every ticket from all users tied to them, respecting the current comment-only restriction. I develop in PHP 7.4 with CodeIgniter 3, jQuery on the front end and MySQL, so keep your solution within that stack. No framework upgrades or major refactors—just the schema extension, model/controller tweaks, and the view update with clean, commented code I can merge. Hand-off items I need: 1. SQL migration script. 2. Updated model, controller and view files (diff or full files). 3. Brief README noting touched files, any dependencies (e.g., Select2 JS), and test steps. Once delivered I will run a quick functional test: assign three Client Admins to one user, log in as each admin and verify they all see that user’s tickets alongside their existing ones.