feat: Wahab 2026-09-28 directives - 5-tech roster, sub-contractors in assign list, penthouse units #17

Merged
abiba-bot merged 1 commits from fm/denya-wahab-answers-20260928 into main 2026-10-02 05:12:53 +00:00
Owner

Applies Wahab Abdul's 2026-09-28 directives (Denya OneCare / Pavilion Accra).

1. Technician roster -> exactly 5 named techs

Samuel Shang, Desmond Afful, Desmond Odekyi, Francis Norgbey, Nicholas Nartey.

  • New app/services/roster.py: converge_tech_roster() runs at startup, idempotent.
  • Off-roster techs are DEACTIVATED, never deleted - ticket history keeps a valid assignee reference.
  • seed.py SEED_USERS_DATA updated. Emails are placeholders (first.last@denya.com) until the client confirms real ones.

2. Sub-contractors in the "Assign to" list

  • New canonical role Sub-contractor; ASSIGNEE_POOL_ROLES = (Tech, Sub-contractor).
  • New GET /api/auth/assignees - active pool members only.
  • Server-side _validate_assignee gate rejects off-pool/deactivated assignees (400/404).
  • "Assign To" dropdown added to the new-ticket form; assigning at creation auto-advances Logged -> Assigned.
  • base.html isTech() includes Sub-contractor (portal UX; tracked "under tech" by the FM coordinator).

3. Penthouse units selectable

  • apartment_mapping.json: PH1E-/PH1W-/PH2E-/PH2W- -> clean codes.
  • seed_units self-heals legacy malformed codes on existing DBs and sets floors.
  • Penthouse units added to the built-in fallback seed.

Tests

  • New tests/test_wahab_directives_20260928.py (8 tests) - roster convergence/deactivate-not-delete, sub-contractor assignability, penthouse presence + floors + no dangling dashes.
  • tests/test_categories_and_units.py: East count 60 -> 62 (penthouses) + penthouse presence assertions.
  • New suite: 8/8 passed. Full suite: 110 passed, 0 failed.

Deploy note for reviewer

Roster convergence deactivates real technician accounts on the live demo DB. Nothing is deleted and ticket history stays intact, but this is a live-data change - please take the pre-flight DB backup on CT 115 (scottdenya) before deploying.

Still outstanding (client owes data, non-blocking)

  1. Email addresses for the 5 technicians.
  2. Sub-contractor names + emails.
Applies Wahab Abdul's 2026-09-28 directives (Denya OneCare / Pavilion Accra). ## 1. Technician roster -> exactly 5 named techs Samuel Shang, Desmond Afful, Desmond Odekyi, Francis Norgbey, Nicholas Nartey. - New `app/services/roster.py`: `converge_tech_roster()` runs at startup, idempotent. - Off-roster techs are **DEACTIVATED, never deleted** - ticket history keeps a valid assignee reference. - `seed.py` SEED_USERS_DATA updated. Emails are placeholders (`first.last@denya.com`) until the client confirms real ones. ## 2. Sub-contractors in the "Assign to" list - New canonical role `Sub-contractor`; `ASSIGNEE_POOL_ROLES = (Tech, Sub-contractor)`. - New `GET /api/auth/assignees` - active pool members only. - Server-side `_validate_assignee` gate rejects off-pool/deactivated assignees (400/404). - "Assign To" dropdown added to the new-ticket form; assigning at creation auto-advances Logged -> Assigned. - `base.html` isTech() includes Sub-contractor (portal UX; tracked "under tech" by the FM coordinator). ## 3. Penthouse units selectable - `apartment_mapping.json`: `PH1E-/PH1W-/PH2E-/PH2W-` -> clean codes. - `seed_units` self-heals legacy malformed codes on existing DBs and sets floors. - Penthouse units added to the built-in fallback seed. ## Tests - New `tests/test_wahab_directives_20260928.py` (8 tests) - roster convergence/deactivate-not-delete, sub-contractor assignability, penthouse presence + floors + no dangling dashes. - `tests/test_categories_and_units.py`: East count 60 -> 62 (penthouses) + penthouse presence assertions. - New suite: 8/8 passed. Full suite: 110 passed, 0 failed. ## Deploy note for reviewer Roster convergence **deactivates real technician accounts on the live demo DB**. Nothing is deleted and ticket history stays intact, but this is a live-data change - please take the pre-flight DB backup on CT 115 (scottdenya) before deploying. ## Still outstanding (client owes data, non-blocking) 1. Email addresses for the 5 technicians. 2. Sub-contractor names + emails.
mumuni-bot added 1 commit 2026-09-29 00:17:24 +00:00
Three client decisions for Denya OneCare / Pavilion Accra:

1. Technician roster converges to exactly 5 named techs
   - Samuel Shang, Desmond Afful, Desmond Odekyi, Francis Norgbey, Nicholas Nartey
   - New app/services/roster.py: converge_tech_roster() runs at startup and is
     idempotent; off-roster techs are DEACTIVATED, never deleted, so ticket
     history keeps a valid assignee reference
   - seed.py SEED_USERS_DATA updated; placeholder emails until client confirms

2. Sub-contractors appear in the "Assign to" list alongside technicians
   - New canonical role "Sub-contractor" (ASSIGNEE_POOL_ROLES = Tech + Sub-contractor)
   - New GET /api/auth/assignees endpoint returns active pool members only
   - Server-side _validate_assignee gate in ticket service rejects off-pool
     or deactivated assignees (400/404)
   - "Assign To" dropdown added to the new-ticket form; assigning at creation
     auto-advances Logged -> Assigned
   - base.html isTech() includes Sub-contractor (portal UX, tracked "under tech")

3. Penthouse units selectable when raising a ticket
   - apartment_mapping.json: PH1E-/PH1W-/PH2E-/PH2W- -> clean codes
   - seed_units self-heals legacy malformed codes on existing DBs and sets floors
   - Penthouse units added to the built-in fallback seed

Tests: new tests/test_wahab_directives_20260928.py (8 tests); updated the
stale East unit count in test_categories_and_units.py (60 -> 62 with penthouses).
Full suite green.
abiba-bot merged commit 4fa18a153f into main 2026-10-02 05:12:53 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SyslogSolution/denya-onecare#17