GeezerVison is showing github.com — Consent template chooser is hidden for departments without an existing consent sentence · Issue #929 · OpenResilienceInitiative/ORISO-Admin
Consent template chooser is hidden for departments without an existing consent sentence #929DescriptionWhy
The department consent-template chooser is hidden when a successful data-protection read omits consentText. The UI currently treats an absent consent map as if the department did not support consent text at all. This prevents fresh or legacy departments from seeding the first consent sentence from a template, despite the implementation delivered for #874.
What to build
- After a successful department data-protection read, treat missing
consentText as an empty supported consent map.
- Keep the chooser hidden for agency-wide legal texts and imprint views.
- Preserve the fail-closed behavior for real loading errors.
- Add a regression test through the real container/component boundary.
Acceptance criteria
- A department with no existing consent sentence still shows the consent editor and template chooser.
- Choosing a template seeds the consent text and can be published successfully.
- Agency-wide and imprint views do not gain a department consent chooser.
- A failed data-protection read does not incorrectly enable the editor.
Reviewer test plan
- Run the focused Admin component/container test for an omitted
consentText response.
- Run the Admin quality gate for the changed module.
- In a fresh department on Dev or an equivalent local stack, open data protection and verify the chooser is visible before any consent sentence exists.
- Select a template, publish it, reload, and verify the saved sentence is shown.
ActivityStorypapst commented on Sep 7, 2026 CollaboratorAuthor More actions I had my coding agent check this. @nikunjdecyb Please link the fix PR for this regression and cover a successful department read with omitted consentText through the real container/component boundary. Verify choosing the first template, publishing and reloading, while genuine read errors remain fail-closed. #888’s merged template work does not cover this newly reported empty-department case.
Storypapst commented on Sep 15, 2026 CollaboratorAuthor More actions Status reconciliation authorized by Frank on 2026-09-15: In progress → Ready.
The empty-department template chooser regression has no current fix handoff in the inspected record. Next: fix the omitted-consentText case and verify template selection, publishing and reload.
This move prioritizes current high-priority work and preserves the remaining scope. Release and priority are unchanged. QA external Dev remains the team's completion boundary.
Storypapst commented on Sep 15, 2026 CollaboratorAuthor More actions Fix handoff: draft PR #966 (branch fix/929-department-consent-empty-state, base dev).
Root cause. The consent field was gated on the payload of the department data-protection read — dppQuery.data && dppQuery.data.consentText !== undefined. An absent key was read as "this backend cannot store consent", so the editor and the template chooser disappeared. It now asks the request instead: a successful department read supports the field, empty map included. undefined keeps its fail-closed meaning for "Alle Fachbereiche", the imprint and every unsuccessful read.
One correction to the report. On the AgencyService currently on Dev the key is never absent — every department returns consentText: null, and the chooser is therefore already visible there today. I swept all 13 departments across the 11 Dev agencies to confirm that. The defect is real but latent: it is a dependence on a serialization detail that the AgencyService pom has already flipped once (openApiNullable=false for the Spring Boot 4 / Jackson 3 move), so the field would vanish again the next time that knob or a @JsonInclude changes.
Verified in the browser against Dev, with this branch's build served into the live Admin page and consentText removed from the read so the reported condition actually occurs:
| Acceptance criterion |
Result |
| Department with no sentence shows the editor and chooser |
pass — deployed build hides both under the same condition |
| Template seeds the sentence and publishes |
pass — PUT .../dpp → 200 with consentText, reload shows the stored sentence |
| Agency-wide and imprint gain no department chooser |
pass |
| Failed read does not enable the editor |
pass — "Legal text could not be loaded", no editor |
Test side: a new regression test drives the real container → card boundary (only TipTap stubbed). Reverting just the container hunk fails those two tests and nothing else. vitest run src/components/Tenants/LegalSettings → 365 tests pass; eslint/prettier/tsc/build clean.
Written on Dev while proving the publish loop: agency 7 "ZZ Testfall Claude 2" / Fachbereich "Schulden" now carries a published DPP with the platform consent sentence. That is a throwaway test record.
Ready for review by an external developer; the ticket stays open and the completion boundary stays with the team. Shirloin commented on Sep 16, 2026 Verified locally with #966: a department without a consent sentence now shows the editor and template chooser, and the chosen template publishes as its first sentence. Admins can set up consent for new departments without a workaround. BjoernLudwig commented on Sep 24, 2026 @Shirloin @nikunjdecyb Please review the first two steps of the reviewer test plan abve. They seem pretty off/unclear to me. Afterwards, if thorough QA internal was performed, please move to QA external and assign me.
MetadataMetadataStatusShow more project fields
DevelopmentNo branches or pull requestsIssue actions
|