Bug 34295 - Staff-only extended attributes break self-registration
Summary: Staff-only extended attributes break self-registration
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-17 14:09 UTC by Jason Boyer
Modified: 2025-12-04 19:12 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Boyer 2023-07-17 14:09:44 UTC
If any patron extended attributes are defined that are mandatory and not opac-editable (such as Address Verified: Yes / No) patron self-registration will always return a 500 error because the mandatory attribute is not / can not be supplied. Avoiding this by limiting mandatory attributes to a specific patron category fails as soon as you want to apply an attribute to 2 or more categories.
Comment 1 Caroline Cyr La Rose 2023-11-03 15:00:15 UTC
Still valid in master (23.06.00.060)

To recreate:

0. PatronSelfRegistration is enabled by default, but if it's not on your system, turn it on

1. Create a mandatory patron attribute type
   1.1. Go to Administration > Patron attribute types
   1.2. Click New patron attribute type
   1.3. Fill out the form as follows:
        - Patron attribute type code: Enter a code (e.g. BZ34295)
        - Description: Enter a description (e.g. Bug 34295)
        - Mandatory: check
   1.4. Click Save

2. Try to register online
   2.1. Go to the OPAC (log out if necessary)
   2.2. Click Register here
   2.3. Fill out the form
        --> The attribute should not be visible
   2.4. Click Submit
        --> Error
Comment 2 Aude Charillon 2025-01-17 12:02:01 UTC
Is this the same situation as in bug 38005?
Comment 3 Christopher Brannon 2025-12-04 19:12:39 UTC
(In reply to Aude Charillon from comment #2)
> Is this the same situation as in bug 38005?

No.  That bug is specific to a conflict with the OPAC itself.

I am running into this issue with Aspen self registration.   The staff mandatory seems to be affecting the self registration API, which Aspen uses.  But Aspen is doing this on behalf of the patron.  It seems like their should be a self registration API that adheres to the OPAC rules.