feat(helpdesk): add software updates tracking with BC ticket integration
New Updates page in the Helpdesk module that fetches UPDATE/UPDATE-HF tickets from Business Central (PBI_LV_Tickets) and allows assigning a domain and Gitea link via a dialog. Ticket status (from BC) and assignment status (local) are shown as separate columns with filters for both plus type and free-text search. Assigned updates also appear on the domain detail page. Includes session-cached BC fetch with refresh button, admin permissions, migration, and 16 unit tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1552,7 +1552,8 @@ JOIN permissions p ON p.`key` IN (
|
||||
'stats.view', 'system_info.view',
|
||||
'roles.assign_all',
|
||||
'helpdesk.access', 'helpdesk.settings.manage', 'helpdesk.team-workload.view', 'helpdesk.risk-radar.view', 'helpdesk.software-products.manage',
|
||||
'helpdesk.handovers.view', 'helpdesk.handovers.create', 'helpdesk.handovers.manage'
|
||||
'helpdesk.handovers.view', 'helpdesk.handovers.create', 'helpdesk.handovers.manage',
|
||||
'helpdesk.updates.view', 'helpdesk.updates.manage'
|
||||
)
|
||||
WHERE r.description IN ('Admin', 'Administrator') OR r.id = 1
|
||||
ON DUPLICATE KEY UPDATE role_id = role_id;
|
||||
|
||||
16
db/updates/2026-04-16-helpdesk-updates-permissions.sql
Normal file
16
db/updates/2026-04-16-helpdesk-updates-permissions.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- Helpdesk module: assign updates permissions to Admin role.
|
||||
-- Idempotent: safe to run multiple times.
|
||||
|
||||
INSERT INTO `role_permissions` (`role_id`, `permission_id`, `created`)
|
||||
SELECT r.id, p.id, NOW()
|
||||
FROM roles r
|
||||
JOIN permissions p ON p.`key` = 'helpdesk.updates.view'
|
||||
WHERE r.description IN ('Admin', 'Administrator') OR r.id = 1
|
||||
ON DUPLICATE KEY UPDATE role_id = role_id;
|
||||
|
||||
INSERT INTO `role_permissions` (`role_id`, `permission_id`, `created`)
|
||||
SELECT r.id, p.id, NOW()
|
||||
FROM roles r
|
||||
JOIN permissions p ON p.`key` = 'helpdesk.updates.manage'
|
||||
WHERE r.description IN ('Admin', 'Administrator') OR r.id = 1
|
||||
ON DUPLICATE KEY UPDATE role_id = role_id;
|
||||
Reference in New Issue
Block a user