Insights rollout — completion plan & tracker¶
This is the execution plan for finishing the Insights rollout (owned by Imran). Read insights-piece.md first for the anatomy and the data-load gate. The rollout is form-by-form, keyed on how each form is launched — that determines whether it's a quick copy-paste or needs a data-push.
✅ Update 2026-06-05 (VERIFIED IN-APP) — the route→loader map is now the source of truth; the A/B/C table below is superseded. We built importable packages and tested them in the Dev app. Key results: - RWO sub-tasks (Unvented Hot Water Storage, NIBE, Damp & Mould) INHERIT insights from the Repair Works Order task — they need DISPLAY-ONLY, no loader. Adding a self-loader duplicates the rows (the handler appends; RWO copy + self-trigger copy). This replaces the old "Category B data-push" assumption for these forms. - Unvented Hot Water Storage v9 is Active in Dev (display + switch, Add disabled, click-in to view) — first form completed end-to-end. - The injector was missing the on-screen Show/Hide switch control; now fixed. - Insights grid must be
showAdd=False(no Add) +showEdit=True(tap to view). - Self-trigger (AppendPropertyInsights) is needed only for forms whose task is NOT already loaded (e.g. Void Survey via Create Jobs). Tap Flushing likely loads via Estate Search. - Management Studio assigns its own sequential version on import (manifest version is cosmetic).
The one rule that decides everything: launch route¶
A form's insights grid only populates if something loads [Versaa].[usp_all_insights]
into its GenBPInsight group at runtime. What loads it depends on how the form
is launched:
| Launch route | Who pushes the data | What you must do |
|---|---|---|
| Property Search / PCA generic path | Property+Search_57.workflow loads insights into the launched form's group, gated by the Insights_OnSwitch workflow variable (currently true, global — generic for any form it launches). |
Category A — copy-paste only. Add the display group to the form. Data flows automatically. |
| Sub-task that runs inside a loaded master task (RWO sub-tasks: UvHWS, NIBE, Damp & Mould) | The master (RWO) already loaded insights into the shared task; the sub-task inherits them. | Display + switch ONLY. ✅ Verified in-app — see the route→loader map. Do NOT add a self-loader: it duplicates rows. |
| Form launched as its own task with no insight loader (e.g. Void Survey via Create Jobs) | Nothing loads insights for that task. | Display + switch + self-loader (RequestPropertyInsights + autoSend button). |
Inline sub-form loaded by a parent via <X> Subform Load (e.g. Client → Client Visit) |
The parent already shows insights; the child inherits it at render. | Do NOT add the piece — a duplicate GenBPInsight breaks the device merge (Client v69). |
| No property/tenancy context (area/stock/vehicle: EAI, Van Check, Relinquishment) | n/a — there's no property to load insights for. | Category C — skip. Point users at the standalone Insights form. |
Two traps already hit this rollout: importing packages built from a stale snapshot (reverted Mark's Dev versions) and injecting an inline sub-form (Client v69 broke task sync). Both are avoided by the route table above plus: always work from a fresh Dev pull, and test in-app that the grid populates before activating — structural validity never proves population.
The three "switches" — don't confuse them¶
There is no single Management Studio on/off toggle for insights. Three separate things, in three different places:
| Name | Type / location | Role | State |
|---|---|---|---|
z_Insights_Switch |
form item (Option List "Show Insights;Hide Insights;") | the user's show/hide choice on the form | per task |
z_Insights |
form item = GetConfigurationValue("Insights") |
form-side config gate feeding z_Insights_Visible's default |
config value |
Insights_OnSwitch |
workflow variable (workflow_variables/…/Insights_OnSwitch.variable) |
gates whether the workflow loads the insights data ("1 = On, 0 = Off") | true (global, already on) |
Implication for the rollout: the data plumbing is global and already on — you do not flip anything per form. You only (a) put the display + toggle items on the form, and (b) for sub-tasks, pass the group down from the master.
Exclusions (in the PCA loader ignore list)¶
Property+Check+Appoint+LoadDat_30.workflow skips these from its data load, so
they are not auto-populated even via PCA: Building Safety Check, Fire Risk
Assessment, Estate Assessment Inspection, Asbestos Survey, Mutual Exchange
Inspection, Warden Resident Seen Check, Fire Door Check, Stock Condition
Survey, Block Survey, HHSRS Survey, Pre Leaving Visit, Damp and Mould
Inspection, Red Flag Reporting, Component Replacement Request, Family Survey 2
MW, Asbestos Data. (Many of these are launched another way and handle insights
themselves; flagged here so you don't assume PCA covers them.)
Worklist (regularly-used forms still lacking the display)¶
Status as of the 040626 fresh pull. "Started" = switch present but no grid.
| Form | May use | Launch route | Category | Status / owner |
|---|---|---|---|---|
| Void Survey | 181 | Property Search / void process | A | switch present — Mark started; confirm before touching |
| Tap Flushing Check | 101 | PCA / scheduled | A | switch present — Mark started; confirm |
| Damp & Mould Inspection | 58 | sub-task of Repair Works Order (+ PCA-ignored) | B | not started — needs data-push |
| Unvented Hot Water Storage | 57 | sub-task of Repair Works Order (UvHWSV) |
B | not started — needs data-push |
| NIBE | 3 | sub-task of Repair Works Order | B | not started — needs data-push |
| Succession Inspection | 3 | sub-task of Client Visit | B | not started — client-insights push |
| Relinquishment Inspection | 1 | sub-task of Client Visit, no property/tenancy keys | C | likely skip — no context |
| Complaint | 1 | own start/complete flow | A?/C? | switch present; verify route + context |
| EAI ×5 (Cars/Tipping/Graffiti/Trees/Team) | 5–7 ea | area/estate, no property | C | skip — standalone Insights form |
Confirmed done (display present): Stock Condition Survey v48 (verify it
populates — it's PCA-ignored), Client Visit, Building Safety Check, Repair Works
Order, Routine Tenancy Visit, Asbestos forms, Red Flag Reporting, Pre-Leaving
Visit, and others (see insights_audit.csv).
Recipe A — copy-paste (Property-Search/PCA forms)¶
Per Mark's method, all in Dev (Management Studio):
- Open the source form with the full piece (FRA Review, or Routine Tenancy Visit / Property Search) in Form Designer.
- Select the insights group + display section (shift-select the block; ctrl to deselect anything extra), copy, exit the form (don't press Back).
- Open the target form, paste the group and the display run (the grid +
gate
SectionBreakElements) onto the Main page after the header. - Inverse-hide the legacy alerts: set the old "Property Alerts" section's
Visibletoz_Insights_Visible != "Show Insights"(don't delete it — keeps the fallback when insights are toggled off). Tidy any other warning sections. - Save as a new version with a clear comment. Do not activate yet.
- Test in Dev (app): launch via Property Search, toggle Show Insights, confirm the grid populates with the property's insights, and that legacy alerts hide. If empty → the form isn't on the property-search path; treat as Category B.
- Activate → migrate Dev→Test→Live (dev-to-live.md).
- Update the form's control document (CLAUDE.md §12).
Recipe B — data-push (sub-task forms)¶
These are spawned by a master (RWO / Client Visit) via
ExtractSubTaskCreateWorkflow, so the insight data must be passed from the
master to the sub-task. Use Peter's Void First Person / Pre-Leaving Visit
wiring as the reference implementation (same RWO sub-task pattern) — copy it.
- Do Recipe A steps 1–4 first (the sub-task form still needs the display group).
- In the master's flow, where the sub-task is created, add a group mapping
that passes the master's
GenBPInsightgroup into the sub-task'sGenBPInsightgroup ("Define Format and Mappings"). The master (RWO / Client Visit) already has insights loaded, so this hands the data down without re-querying. The reusableAppend+Property+Insights_15.workflow(*.AppendPropertyInsights→usp_all_insights, keyed onGenBP_Key_PropertyId) is the alternative if the master's group isn't available at that point. - For Client Visit sub-tasks (Succession), the parent carries client insights — pass that group through; confirm the sub-task has a tenancy/property key to key on.
- Test in Dev (app): complete the master, open the spawned sub-task, toggle Show Insights, confirm the grid populates. This is the step that catches a bad mapping — do not skip it.
- New version, activate, migrate, control doc — as Recipe A.
Recipe B touches a master workflow and only verifies in the app. Coordinate with Peter (who owns this pattern) and re-pull Dev before editing so you build on the current master version.
Recommended sequence¶
- Agree the split with Mark & Peter. Mark: Category-A forms he's started (Void Survey, Tap Flushing). Peter: the data-push pattern (Void First Person / Pre-Leaving). You: the rest, using their work as templates.
- The global plumbing is already on — the
Insights_OnSwitchworkflow variable istrueand the query variables ($QL_Property_Insights$etc.) exist. This is NOT a form item and NOT an MS form-designer toggle; nothing to switch on per form. (The form-sidez_Insights=GetConfigurationValue("Insights")is a separate config gate;z_Insights_Switchis the user's Show/Hide toggle on the form.) - Finish Category A first (fast wins) for any property-search forms not already taken.
- Category B once Peter's reference wiring exists to copy: Damp & Mould → Unvented HW → NIBE (all RWO), then Succession (Client Visit).
- Category C: leave EAI / Relinquishment on the standalone Insights form.
- One form at a time, end-to-end, tested in-app, control doc updated, then Dev→Test→Live.
Per-form pre-flight checklist¶
- [ ] Re-pulled Dev (snapshot current) — see snapshot-lag gotcha.
- [ ] Confirmed nobody else (Mark) is mid-edit on this form.
- [ ] Category confirmed (A / B / C) from the launch route.
- [ ] Not an inline sub-form (
<X> Subform Load) — if it is, do nothing. - [ ] Display added + legacy alerts inverse-hidden.
- [ ] (B only) master→sub-task
GenBPInsightmapping added. - [ ] In-app Dev test: grid populates + toggle works.
- [ ] New version comment; activated only after passing.
- [ ] Control document updated (CLAUDE.md §12).
- [ ] Migrated Dev→Test→Live.
Related¶
- forms/insights-route-loader-map.md — which loader fills each form's grid; corrected per-form A/B/C + the 3 verification experiments
- forms/insights-piece.md — anatomy, data-load gate, snapshot-lag gotcha
- deployment/dev-to-live.md — migration + version comments
- forms/repair-works-order.md — the master for the RWO sub-task forms