Summary: | Offer selections for preferences which ask for patron categories | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | System Administration | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | caroline.cyr-la-rose, david, fridolin.somers, gmcharlt, jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Caroline Cyr La Rose | Documentation submission: | https://gitlab.com/koha-community/koha-manual/-/merge_requests/968 |
Text to go in the release notes: |
This enhancement to system preferences lets you select patron categories from a dropdown list, instead of manually entering patron category codes. This prevents possible errors from manually entering incorrect codes.
This is enabled for these system preferences:
- PatronSelfRegistrationDefaultCategory (single option)
- GoogleOpenIDConnectDefaultCategory (single option)
- OPACHoldsIfAvailableAtPickup (multiple options)
- BatchCheckouts (multiple options)
|
Version(s) released in: |
21.05.00
|
Circulation function: | |||
Attachments: |
Bug 27652: Display patron's categories for sysprefs expecting them
Bug 27652: Display patron's categories for sysprefs expecting them Bug 27652: (follow-up) Correct typo in database update Bug 27652: Display patron's categories for sysprefs expecting them Bug 27652: (follow-up) Correct typo in database update Bug 27652: Display patron's categories for sysprefs expecting them Bug 27652: (follow-up) Correct typo in database update |
Description
Owen Leonard
2021-02-08 12:36:39 UTC
Created attachment 116605 [details] [review] Bug 27652: Display patron's categories for sysprefs expecting them Feel lazy today to write a test plan for that patch, but it seems to work correctly so far. Thanks Jonathan! I'll test and add a test plan. Created attachment 116687 [details] [review] Bug 27652: Display patron's categories for sysprefs expecting them This patch adds a new type of system preference entry option: patron category. A preference with this type will show either a <select> with patron categories to choose from or a multiple-select menu for choosing one or more. This prevents possible errors from incorrect category codes being entered manually. To test, apply the patch and run the database update. - Go to Administration -> System preferences. - Test each of the updated preferences to confirm that the available options are correct and that your selections are correctly saved. - Single category selections, PatronSelfRegistrationDefaultCategory and GoogleOpenIDConnectDefaultCategory. With each of these you should see a dropdown where you can select of all the existing patron categories. - Multiple selections, OPACHoldsIfAvailableAtPickup and BatchCheckouts: These preferences should have an option for selecting one or more system preferences at once. - Test the pages affected by the updated system preferences: - With BatchCheckouts enabled, confirm that the batch checkout page is correctly limited by patron category. - Set the OPACHoldsIfAvailableAtPickup preference to "Don't allow" and select at least one patron category in the OPACHoldsIfAvailableAtPickupExceptions preference. - Log in to the OPAC as a patron whose category was not selected in the OPACHoldsIfAvailableAtPickupExceptions preference. - Try to place a hold on an item which is available at a library. - When confirming the hold, the libraries where the item is available should be disabled in the "Pick up location" dropdown. - Repeat the process as a patron whose category was selected in OPACHoldsIfAvailableAtPickupExceptions. There should be no disabled pickup locations. Created attachment 116688 [details] [review] Bug 27652: (follow-up) Correct typo in database update This patch adds a missing "SET" in the database update. Before: UPDATE systempreferences value=REPLACE(value, '|', ',') Corrected: UPDATE systempreferences SET value=REPLACE(value, '|', ',') Created attachment 117225 [details] [review] Bug 27652: Display patron's categories for sysprefs expecting them This patch adds a new type of system preference entry option: patron category. A preference with this type will show either a <select> with patron categories to choose from or a multiple-select menu for choosing one or more. This prevents possible errors from incorrect category codes being entered manually. To test, apply the patch and run the database update. - Go to Administration -> System preferences. - Test each of the updated preferences to confirm that the available options are correct and that your selections are correctly saved. - Single category selections, PatronSelfRegistrationDefaultCategory and GoogleOpenIDConnectDefaultCategory. With each of these you should see a dropdown where you can select of all the existing patron categories. - Multiple selections, OPACHoldsIfAvailableAtPickup and BatchCheckouts: These preferences should have an option for selecting one or more system preferences at once. - Test the pages affected by the updated system preferences: - With BatchCheckouts enabled, confirm that the batch checkout page is correctly limited by patron category. - Set the OPACHoldsIfAvailableAtPickup preference to "Don't allow" and select at least one patron category in the OPACHoldsIfAvailableAtPickupExceptions preference. - Log in to the OPAC as a patron whose category was not selected in the OPACHoldsIfAvailableAtPickupExceptions preference. - Try to place a hold on an item which is available at a library. - When confirming the hold, the libraries where the item is available should be disabled in the "Pick up location" dropdown. - Repeat the process as a patron whose category was selected in OPACHoldsIfAvailableAtPickupExceptions. There should be no disabled pickup locations. Signed-off-by: David Nind <david@davidnind.com> Created attachment 117226 [details] [review] Bug 27652: (follow-up) Correct typo in database update This patch adds a missing "SET" in the database update. Before: UPDATE systempreferences value=REPLACE(value, '|', ',') Corrected: UPDATE systempreferences SET value=REPLACE(value, '|', ',') Signed-off-by: David Nind <david@davidnind.com> I love this improvement, but I think I found a problem: When you use select all it selects all checkboxes, but it saved to my database as 0. Tested with the BatchCheckouts preference. I did run the database update. (In reply to Katrin Fischer from comment #8) > I love this improvement, but I think I found a problem: > > When you use select all it selects all checkboxes, but it saved to my > database as 0. Tested with the BatchCheckouts preference. I did run the > database update. Scratch that - I looked at the wrong preference... and forgot to turn the feature on *sigh* Created attachment 117892 [details] [review] Bug 27652: Display patron's categories for sysprefs expecting them This patch adds a new type of system preference entry option: patron category. A preference with this type will show either a <select> with patron categories to choose from or a multiple-select menu for choosing one or more. This prevents possible errors from incorrect category codes being entered manually. To test, apply the patch and run the database update. - Go to Administration -> System preferences. - Test each of the updated preferences to confirm that the available options are correct and that your selections are correctly saved. - Single category selections, PatronSelfRegistrationDefaultCategory and GoogleOpenIDConnectDefaultCategory. With each of these you should see a dropdown where you can select of all the existing patron categories. - Multiple selections, OPACHoldsIfAvailableAtPickup and BatchCheckouts: These preferences should have an option for selecting one or more system preferences at once. - Test the pages affected by the updated system preferences: - With BatchCheckouts enabled, confirm that the batch checkout page is correctly limited by patron category. - Set the OPACHoldsIfAvailableAtPickup preference to "Don't allow" and select at least one patron category in the OPACHoldsIfAvailableAtPickupExceptions preference. - Log in to the OPAC as a patron whose category was not selected in the OPACHoldsIfAvailableAtPickupExceptions preference. - Try to place a hold on an item which is available at a library. - When confirming the hold, the libraries where the item is available should be disabled in the "Pick up location" dropdown. - Repeat the process as a patron whose category was selected in OPACHoldsIfAvailableAtPickupExceptions. There should be no disabled pickup locations. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 117893 [details] [review] Bug 27652: (follow-up) Correct typo in database update This patch adds a missing "SET" in the database update. Before: UPDATE systempreferences value=REPLACE(value, '|', ',') Corrected: UPDATE systempreferences SET value=REPLACE(value, '|', ',') Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.05, thanks to everybody involved! Enhancement not pushed to 20.11.x |