Bug 41067 - 'OPAC mandatory' attribute setting requires 'Editable in OPAC' to work
Summary: 'OPAC mandatory' attribute setting requires 'Editable in OPAC' to work
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low trivial
Assignee: Jonathan Druart
QA Contact: Laura Escamilla
URL:
Keywords:
Depends on:
Blocks: 41101
  Show dependency treegraph
 
Reported: 2025-10-21 20:24 UTC by Sara Brown
Modified: 2025-11-04 20:54 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 41067: Disable OPAC mandatory when not editable (3.19 KB, patch)
2025-10-23 10:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41067: Disable OPAC mandatory when not editable (3.24 KB, patch)
2025-10-24 16:41 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 41067: (follow-up) Change hint to include 'Editable' requirement (1.32 KB, patch)
2025-10-24 16:41 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 41067: Disable OPAC mandatory when not editable (3.30 KB, patch)
2025-10-30 14:07 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 41067: (follow-up) Change hint to include 'Editable' requirement (1.39 KB, patch)
2025-10-30 14:07 UTC, Laura Escamilla
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Sara Brown 2025-10-21 20:24:24 UTC
If an attribute has 'OPAC mandatory' selected but does not have 'Editable in OPAC' checked, the attribute will not appear on the self-registration form. Patrons can still successfully self-register, however. To make this clearer, the description for 'OPAC mandatory' should be updated to remove 'creating or' from 'Check to make this attribute mandatory when creating or editing a patron from the OPAC', *or* a note should be added indicating that 'Editable in OPAC' must also be checked for the attribute to be included on the self-reg form.
Comment 1 Sara Brown 2025-10-21 20:37:44 UTC
On further testing, it appears that 'OPAC mandatory' only works if 'Editable in OPAC' is also selected, even for account modifications. Example:

-Create an attribute with 'OPAC mandatory' selected and with 'Editable in OPAC' not selected
-Create a self-registered account - note that the attribute doesn't show on the self-reg form, but the account is created successfully
-View the patron account from the staff interface and confirm that the attribute is null
-Log into your new OPAC account - note that attribute doesn't show for editing
-Change some non-attribute information in your OPAC account, and submit changes. Note that the changes save normally.

Given this, I'd amend my first comment to say that the 'OPAC mandatory' attribute setting should have an added note indicating that it's only relevant if the attribute is editable in the OPAC.
Comment 2 Jonathan Druart 2025-10-23 10:59:29 UTC
Created attachment 188324 [details] [review]
Bug 41067: Disable OPAC mandatory when not editable

If a patron attribute is not editable at the OPAC it should not be
possible to make it mandatory.

Test plan:
Create a new patron attribute and confirm that checkboxes behaviour is
consistent.
Comment 3 Owen Leonard 2025-10-24 16:41:19 UTC
Created attachment 188420 [details] [review]
Bug 41067: Disable OPAC mandatory when not editable

If a patron attribute is not editable at the OPAC it should not be
possible to make it mandatory.

Test plan:
Create a new patron attribute and confirm that checkboxes behaviour is
consistent.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Owen Leonard 2025-10-24 16:41:21 UTC
Created attachment 188421 [details] [review]
Bug 41067: (follow-up) Change hint to include 'Editable' requirement
Comment 5 Laura Escamilla 2025-10-30 14:07:13 UTC
Created attachment 188657 [details] [review]
Bug 41067: Disable OPAC mandatory when not editable

If a patron attribute is not editable at the OPAC it should not be
possible to make it mandatory.

Test plan:
Create a new patron attribute and confirm that checkboxes behaviour is
consistent.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 6 Laura Escamilla 2025-10-30 14:07:22 UTC
Created attachment 188658 [details] [review]
Bug 41067: (follow-up) Change hint to include 'Editable' requirement

Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 7 Lucas Gass (lukeg) 2025-10-31 21:31:47 UTC
Nice work everyone!

Pushed to main for 25.11