Bug 17987

Summary: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: System AdministrationAssignee: Aleisha Amohia <aleisha>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, jonathan.druart, severine.queune
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11536
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 17987: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref
Bug 17987: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref
Bug 17987: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref
Bug 17987: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref

Description Aleisha Amohia 2017-01-25 02:25:06 UTC
Rather than a free text syspref where a user can easily put in a category that doesn't exist.
Comment 1 Aleisha Amohia 2017-01-27 03:17:53 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2017-01-27 03:22:40 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2017-01-27 19:42:19 UTC
Could this show the description instead of the code?
Comment 4 Aleisha Amohia 2017-01-29 20:52:00 UTC Comment hidden (obsolete)
Comment 5 Claire Gravely 2017-01-30 09:50:19 UTC
Created attachment 59640 [details] [review]
Bug 17987: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref

This removes the chance of a librarian putting in a patron category that
does not exist and having PatronSelfRegistrationDefaultCategory default
to the first category in the list.

To test:
1) Put a false category code into the PatronSelfRegistrationDefaultCategory syspref
2) Go to the OPAC to self register
3) Notice the selected category type is just the first category in the
list (alphabetically)
4) Apply patch and update database
5) Go back to the PatronSelfRegistrationDefaultCategory syspref
6) Select a category from the dropdown and save
7) Go back to the OPAC and attempt to self register
8) Confirm that the correct category is now showing

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Comment 6 Jonathan Druart 2017-02-01 09:13:42 UTC
Hi Aleisha,

Here are a few remarks:
1/ in the preferences.pl file, I think it would be better to affect the patron category list to $chunk->{'CHOICES'} if the type of the syspref is patron-categories, and not depending on its name. That way it will be reusable more easily.

2/ There is type=PatronCategories"in the DB, choices:patron-categories in the opac.pref, then choices eq 'patron-categories' in preferences.pl
How is useful this type=PatronCategories?

3/ There are 2 problematic cases:
a. The field is not filled yet: it's not visible on the interface, there is no blank entry
b. A bit more tricky: if the patron category has been removed, it will not be displayed.
Comment 7 Jonathan Druart 2023-02-23 10:20:31 UTC

*** This bug has been marked as a duplicate of bug 27634 ***