Bug 17987 - Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref
Summary: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref
Status: RESOLVED DUPLICATE of bug 27634
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-25 02:25 UTC by Aleisha Amohia
Modified: 2023-02-23 10:20 UTC (History)
3 users (show)

See Also:
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 (4.96 KB, patch)
2017-01-27 03:17 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 17987: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref (4.91 KB, patch)
2017-01-27 03:22 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 17987: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref (5.08 KB, patch)
2017-01-29 20:52 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 17987: Changing PatronSelfRegistrationDefaultCategory to a dropdown menu syspref (5.13 KB, patch)
2017-01-30 09:50 UTC, Claire Gravely
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 ***