toga-ai 1.0.930 → 1.0.931
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/knowledge/1.0/apps/togadesk/INDEX.md +1 -0
- package/knowledge/1.0/apps/togadesk/features/per-client-host-restriction.md +2 -0
- package/knowledge/1.0/apps/togadesk/features/ticket-assign-to-lists.md +73 -0
- package/knowledge/INDEX.md +2 -1
- package/knowledge/clients/imhouston/INDEX.md +5 -0
- package/knowledge/clients/imhouston/profile.md +29 -0
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| [REST API (RPC-over-POST) & API-Key Auth](features/rest-api.md) | TOGa Desk programmatic API at `desk/api/` — an RPC-over-POST dispatcher (not verb/URL REST) with API-key auth; open for the request shape, status codes, auth fl |
|
|
12
12
|
| [SMB Contract Editing & the clientMspId Corruption Trap](features/smb-contract-editing.md) | TOGa Desk SMB contracts modal (`/desk/?route=toga/smbcontracts`) and the `clientMspId` corruption trap that made MSP portal users see "You have no assigned clie |
|
|
13
13
|
| [Staff Login Authentication (signIn) — AD vs. local password](features/staff-login-authentication.md) | TOGa Desk staff login via `signIn()` — AD branch (live) vs. |
|
|
14
|
+
| [Ticket "Assign To" Lists (who can be assigned a ticket)](features/ticket-assign-to-lists.md) | How the ticket "Assign To" pickers are built (new/edit/merge modals, ticket page) and the hardcoded client exclusion list (`ASSIGN_TO_EXCLUDED_CLIENTS`, IM Hous |
|
|
14
15
|
| [Ticket Lifecycle (class.ticket.php)](features/ticket-lifecycle.md) | TOGa Desk ticket creation + reply handling via `Ticket` (class.ticket.php): the four creation/reply doors, `deriveCustomerId()`, and the `addReply()` status swi |
|
|
15
16
|
| [Reverting a TOGa Desk _production Deploy (revert-forward)](workflows/production-revert-forward.md) | How to cleanly roll back one ticket's changes from the togadesk `_production` branch via `git revert -m 1` of its two-parent merge, verified with `git patch-id` |
|
|
16
17
|
| [Standalone PHP Test Script Bootstrap (TOGa Desk)](workflows/standalone-test-scripts.md) | How to bootstrap the TOGa Desk 1.0 framework in a standalone CLI PHP script for read-only testing of desk classes (e.g. |
|
|
@@ -23,6 +23,7 @@ files:
|
|
|
23
23
|
related:
|
|
24
24
|
- ../architecture.md
|
|
25
25
|
- ../../togaview/architecture.md
|
|
26
|
+
- ticket-assign-to-lists.md
|
|
26
27
|
---
|
|
27
28
|
|
|
28
29
|
TOGa Desk per-client branded URLs via `getRestrictedClient()` (host→CLIENT_* switch, UI gate only); open before adding a new branded subdomain (CopyrightHosts hard gate, cert, sessions) or touching login gating.
|
|
@@ -64,3 +65,4 @@ The app code is the easy part. What actually bites:
|
|
|
64
65
|
## Related
|
|
65
66
|
- [TOGa Desk architecture](../architecture.md)
|
|
66
67
|
- [TOGa View architecture](../../togaview/architecture.md)
|
|
68
|
+
- [Ticket Assign To lists](ticket-assign-to-lists.md) — `CLIENT_IMHOUSTON` excluded from ticket assignees
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Ticket "Assign To" Lists (who can be assigned a ticket)
|
|
3
|
+
framework: "1.0"
|
|
4
|
+
repo: togadesk
|
|
5
|
+
project: TOGa Desk
|
|
6
|
+
client: shared
|
|
7
|
+
type: feature
|
|
8
|
+
status: active
|
|
9
|
+
updated: 2026-10-01
|
|
10
|
+
owners: ["mhammontree"]
|
|
11
|
+
files:
|
|
12
|
+
- desk/includes/functions.php
|
|
13
|
+
- desk/includes/controllers/modals.php
|
|
14
|
+
- desk/template/modals/tickets/add.php
|
|
15
|
+
- desk/template/pages/tickets/manage.php
|
|
16
|
+
- desk/includes/controllers/modals/tickets/merge.php
|
|
17
|
+
related:
|
|
18
|
+
- ../architecture.md
|
|
19
|
+
- ticket-lifecycle.md
|
|
20
|
+
- per-client-host-restriction.md
|
|
21
|
+
- ../../../../clients/imhouston/profile.md
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
How the ticket "Assign To" pickers are built (new/edit/merge modals, ticket page) and the hardcoded client exclusion list (`ASSIGN_TO_EXCLUDED_CLIENTS`, IM Houston); open before changing who appears as a ticket assignee.
|
|
25
|
+
|
|
26
|
+
## Summary
|
|
27
|
+
|
|
28
|
+
- Staff and end users both live in `TOGaDeskSupport.people`, split by `type` (`'admin'` | `'user'`). `$isAdmin` = `people.type == 'admin'`.
|
|
29
|
+
- Each ticket Assign To picker runs its **own** people query — there is no shared helper for the list itself.
|
|
30
|
+
- Since TRUE-82408, every ticket picker drops people whose `clientid` is in `ASSIGN_TO_EXCLUDED_CLIENTS` (today: `CLIENT_IMHOUSTON` = 167).
|
|
31
|
+
|
|
32
|
+
## How it works
|
|
33
|
+
|
|
34
|
+
**Exclusion list** — `desk/includes/functions.php`:
|
|
35
|
+
- `const ASSIGN_TO_EXCLUDED_CLIENTS = [CLIENT_IMHOUSTON];`
|
|
36
|
+
- `assignToExcludedClientsSql(string $clientIdColumn = 'people.clientid'): string` returns `<col> NOT IN (<ids>)` (ids `intval`'d), or `1 = 1` when the list is empty.
|
|
37
|
+
- To add/remove a client: edit **only** the array. Every ticket picker picks it up.
|
|
38
|
+
|
|
39
|
+
**The ticket pickers — 6 queries in 5 places (all apply the exclusion):**
|
|
40
|
+
1. New Ticket modal, `tickets/add` (`modals.php`) — `$users` and `$admins`.
|
|
41
|
+
- First render (`template/modals/tickets/add.php`) uses `$users` = every person at the logged-in user's client, **any type** (non-RUMCSI branch).
|
|
42
|
+
- Only after the Client dropdown changes (rendered only when `$isAdmin`) does JS `updateAdminIdForClient()` rebuild the list from `$admins` + `peopleDepartments`.
|
|
43
|
+
2. `tickets/addNew` (`modals.php`) — `$admins`.
|
|
44
|
+
3. Edit Ticket modal, `tickets/edit` (`modals.php`) — `$peopleDepartments` = admins linked via `profile_departments` → `people_profiles`; JS `changeDepartment` builds the list. The exclusion keeps the current assignee via `OR people.id = (int)$ticket['adminid']`, so saving the modal does not silently drop an existing assignment.
|
|
45
|
+
4. Ticket page "Assign to..." (`template/pages/tickets/manage.php`) — shows only when the ticket has no `adminid`/`policyid`; filters by profile department + `profile_clients`; filters by client **only** on a branded host (see [per-client-host-restriction](per-client-host-restriction.md)).
|
|
46
|
+
5. Merge modal "Assign To Staff" (`controllers/modals/tickets/merge.php`).
|
|
47
|
+
|
|
48
|
+
**Not covered (own `$admins` queries, not ticket lists):** issues, projects, escalation rules, policy tasks, `clients/assignAdmin`. Add `assignToExcludedClientsSql()` there only if the exclusion should reach them.
|
|
49
|
+
|
|
50
|
+
## Decisions
|
|
51
|
+
|
|
52
|
+
- **2026-10-01 (mhammontree): hardcoded per-client list, not a per-person `people.isAssignable` flag.** 1.0 is retired end of 2026, so no schema change. IM Houston staff do not work tickets; if one is needed, they request an exception (edit the array).
|
|
53
|
+
- **Accepted side effects:**
|
|
54
|
+
- Anyone with `people.clientid = 167` is hidden — including Christian Mayobe (Field Technician) who also works Craftex (client 169) tickets.
|
|
55
|
+
- On the IM Houston branded host the Assign To list is empty (the host already restricts to client 167).
|
|
56
|
+
|
|
57
|
+
## Gotchas
|
|
58
|
+
|
|
59
|
+
- **Edit modal shows inactive admins** — `$peopleDepartments` has no `isActive` check.
|
|
60
|
+
- **New Ticket modal's first list includes end users** (`type = 'user'`), not only staff, until the Client dropdown changes.
|
|
61
|
+
- **Pre-existing, NOT fixed (needs its own ticket):**
|
|
62
|
+
- `manage.php` ~L201: `LEFT OUTER JOIN profile_clients ON profile_clients.profileid = people_profiles.peopleid = people.id` — chained comparison, almost certainly wrong.
|
|
63
|
+
- Unescaped/uncast SQL near these queries: `$clientId`, `$userid`, `{$ticket['departmentid']}`, `{$ticket['clientid']}`, `$_GET['clientid']` (managed/addAsset), `$_GET['customerId']` (tickets/add, addNew). Cast/escape per the security rules when touching them.
|
|
64
|
+
- Data oddity: person 70954 (Minh Nguyen) has `clientid` 167 but role "Advanced User RUMC staff Member" — also hidden by the exclusion.
|
|
65
|
+
|
|
66
|
+
## Related
|
|
67
|
+
- [TOGa Desk architecture](../architecture.md)
|
|
68
|
+
- [Ticket lifecycle](ticket-lifecycle.md)
|
|
69
|
+
- [Per-client hostname restriction](per-client-host-restriction.md)
|
|
70
|
+
- [IM Houston profile](../../../../clients/imhouston/profile.md)
|
|
71
|
+
|
|
72
|
+
## Change history
|
|
73
|
+
- 2026-10-01 — TRUE-82408: added `ASSIGN_TO_EXCLUDED_CLIENTS` (IM Houston) to all 6 ticket Assign To queries; togadesk commit db899a59, not yet deployed (mhammontree)
|
package/knowledge/INDEX.md
CHANGED
|
@@ -8,7 +8,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
|
|
|
8
8
|
- **worker** (Worker) — 41 doc(s) → [1.0/apps/worker/INDEX.md](1.0/apps/worker/INDEX.md)
|
|
9
9
|
- **dbchanges** (Database Changes) _(framework core)_ — 1 doc(s) → [1.0/apps/dbchanges/INDEX.md](1.0/apps/dbchanges/INDEX.md)
|
|
10
10
|
- **worker1.5** (Worker 1.5) — 0 doc(s) → [1.0/apps/worker1.5/INDEX.md](1.0/apps/worker1.5/INDEX.md)
|
|
11
|
-
- **togadesk** (TOGa Desk) —
|
|
11
|
+
- **togadesk** (TOGa Desk) — 14 doc(s) → [1.0/apps/togadesk/INDEX.md](1.0/apps/togadesk/INDEX.md)
|
|
12
12
|
- **togaview** (TOGa View) — 8 doc(s) → [1.0/apps/togaview/INDEX.md](1.0/apps/togaview/INDEX.md)
|
|
13
13
|
- **webhook** (Webhook) — 1 doc(s) → [1.0/apps/webhook/INDEX.md](1.0/apps/webhook/INDEX.md)
|
|
14
14
|
- **walmarttechservices** (Walmart Tech Services) — 1 doc(s) → [1.0/apps/walmarttechservices/INDEX.md](1.0/apps/walmarttechservices/INDEX.md)
|
|
@@ -59,6 +59,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
|
|
|
59
59
|
- **Endeavor Health** (`endeavor-health`) → [clients/endeavor-health/INDEX.md](clients/endeavor-health/INDEX.md)
|
|
60
60
|
- **Fordham University** (`fordham`) → [clients/fordham/INDEX.md](clients/fordham/INDEX.md)
|
|
61
61
|
- **GroWrk** (`growrk`) → [clients/growrk/INDEX.md](clients/growrk/INDEX.md)
|
|
62
|
+
- **IM Houston** (`imhouston`) → [clients/imhouston/INDEX.md](clients/imhouston/INDEX.md)
|
|
62
63
|
- **ManageLife** (`managelife`) → [clients/managelife/INDEX.md](clients/managelife/INDEX.md)
|
|
63
64
|
- **Northwell Health** (`northwell`) → [clients/northwell/INDEX.md](clients/northwell/INDEX.md)
|
|
64
65
|
- **New York City Department of Education** (`nycdoe`) → [clients/nycdoe/INDEX.md](clients/nycdoe/INDEX.md)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "IM Houston"
|
|
3
|
+
framework: "1.0"
|
|
4
|
+
apps:
|
|
5
|
+
- togadesk
|
|
6
|
+
- library
|
|
7
|
+
project: TOGa Desk
|
|
8
|
+
client: imhouston
|
|
9
|
+
type: profile
|
|
10
|
+
status: active
|
|
11
|
+
updated: 2026-10-01
|
|
12
|
+
owners: ["mhammontree"]
|
|
13
|
+
files: []
|
|
14
|
+
related:
|
|
15
|
+
- ../../1.0/apps/togadesk/features/ticket-assign-to-lists.md
|
|
16
|
+
- ../../1.0/apps/togadesk/features/per-client-host-restriction.md
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
IM Houston TOGa Desk client (togadesk `clients.id` 167, `CLIENT_IMHOUSTON`); open for its togadesk-specific rules.
|
|
20
|
+
|
|
21
|
+
## Summary
|
|
22
|
+
|
|
23
|
+
- TOGa Desk (1.0) client: `TOGaDeskSupport.clients.id` **167**, constant `CLIENT_IMHOUSTON` in `desk/includes/functions.php`.
|
|
24
|
+
- Has its own branded TOGa Desk host — see [per-client-host-restriction](../../1.0/apps/togadesk/features/per-client-host-restriction.md).
|
|
25
|
+
- Also a 2.0 tenant (`Client_Imhouston`); 2.0 scope not yet added to `apps`.
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- **IM Houston staff are not ticket assignees.** Excluded from every ticket Assign To picker via `ASSIGN_TO_EXCLUDED_CLIENTS` (TRUE-82408). Exceptions on request — see [ticket-assign-to-lists](../../1.0/apps/togadesk/features/ticket-assign-to-lists.md).
|
package/package.json
CHANGED