Bug 41749

Summary: Add patron consent status display to staff patron detail page
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: PatronsAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david, gmcharlt, jake.deery, kyle, lucy.vaux-harvey, m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: Unsponsored Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Adds a "Consents" section to the staff patron detail page. It shows the patron's privacy consent status (when PrivacyPolicyConsent is enabled) and any plugin-defined consent types. Each consent displays with visual status indicators: - Green checkmark with timestamp when consent was given - Red X with timestamp when consent was refused - Gray "Not specified" when no consent recorded
Version(s) released in:
Circulation function:
Bug Depends on: 31503    
Bug Blocks:    
Attachments: Bug 41749: Display patron consents on staff patron detail page
Bug 41749: Display patron consents on staff patron detail page

Description Martin Renvoize (ashimema) 2026-02-02 11:57:37 UTC
Currently, staff members have no visibility into what consents a patron has given or refused. The consent management exists only in the OPAC (opac-patron-consent.pl), where patrons can manage their own consent preferences for GDPR and plugin-defined consent types (added in bug 31503).

This creates a gap in staff workflows - when assisting patrons or reviewing accounts, staff cannot see whether a patron has consented to privacy policies or other consent types defined by plugins.
Comment 1 Martin Renvoize (ashimema) 2026-02-02 12:01:16 UTC
Created attachment 192310 [details] [review]
Bug 41749: Display patron consents on staff patron detail page

Adds a read-only "Consents" section to the staff patron detail page
showing the patron's consent status for GDPR (when PrivacyPolicyConsent
is enabled) and any plugin-defined consent types.

Each consent displays with visual status indicators:
- Green checkmark with timestamp when consent was given
- Red X with timestamp when consent was refused
- Gray "Not specified" when no consent recorded

Test plan:
1. Enable PrivacyPolicyConsent system preference
2. As patron in OPAC: give/refuse consent at "Your consents"
3. As staff: view patron detail page
4. Verify "Consents" section shows correct status and timestamp
5. Test with no consent recorded (should show "Not specified")
6. If available, test with plugin-defined consent types
Comment 2 David Nind 2026-02-02 19:42:52 UTC
Created attachment 192342 [details] [review]
Bug 41749: Display patron consents on staff patron detail page

Adds a read-only "Consents" section to the staff patron detail page
showing the patron's consent status for GDPR (when PrivacyPolicyConsent
is enabled) and any plugin-defined consent types.

Each consent displays with visual status indicators:
- Green checkmark with timestamp when consent was given
- Red X with timestamp when consent was refused
- Gray "Not specified" when no consent recorded

Test plan:
1. Enable PrivacyPolicyConsent system preference
2. As patron in OPAC: give/refuse consent at "Your consents"
3. As staff: view patron detail page
4. Verify "Consents" section shows correct status and timestamp
5. Test with no consent recorded (should show "Not specified")
6. If available, test with plugin-defined consent types

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2026-02-02 19:45:12 UTC
Testing notes (using KTD):

1. Did not test step 6, "test with plugin-defined consent types".