Bug 11536

Summary: patron self registration fails when PatronSelfRegistrationDefaultCategory is set to nonexistent borrower category code
Product: Koha Reporter: Liz Rea <liz>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aleisha
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17987
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Liz Rea 2014-01-13 22:48:03 UTC
To replicate:

Turn on PatronSelfRegistration 
set PatronSelfRegistrationDefaultCategory to a category code that doesn't exist. On the sample data, I used A.

Try to register a borrower through the OPAC - everything will look like it worked, however the borrower will not be assigned a user.name - they cannot log in. 
Check in the staff client - the borrower was not created.
Comment 1 Aleisha Amohia 2017-01-25 01:50:36 UTC
The original bug you are reporting doesn't seem quite valid anymore. Instead there is a different bug. It doesn't matter what you put in the PatronSelfRegistrationDefaultCategory because the OPAC form itself has a category field that sets the patron category. 

My opinion is that the PatronSelfRegistrationDefaultCategory should be changed to a dropdown with a list of the existing patron categories. If it is set to something, then the category field in the OPAC form should be removed and will be set to whatever is in PatronSelfRegistrationDefaultCategory. If it is empty, the user can select their category themselves (the current behaviour).
Comment 2 Aleisha Amohia 2017-01-25 01:55:44 UTC
Actually, my mistake - this seems to be fixed now. If the input in PatronSelfRegistrationDefaultCategory doesnt match an existing category, the category list is still there and the patron is assigned the first one in the list. This doesn't seem to be a bug anymore. Setting to Resolved
Comment 3 Aleisha Amohia 2017-01-27 03:21:28 UTC
I have added a patch to bug 17987 to make this syspref a dropdown menu selection