the system preference OPACAllowUserToChooseBranch disaply all the branchs instead of display only the branchs who accept the holds. Result: a branch can be pickup location when he does not want to manage holds
Could you explain how this should work? I am not sure what preferences/configuration settings should be taken into account to make the pull down more 'clever'. Maybe one idea would be to have the list of libraries offered in the pull down configurable?
At this time, to display pick-up branches when "OPACAllowUserToChooseBranch" is on, "Opac-reserve.pl" calls for "GetBranchesLoop" and all the branches can be selected by users. It would be great to be able to configurate the pick-up branches and choose either all the branches either only the branches which allow holds. Maybe it could be a third option for "OPACAllowUserToChooseBranch" ? Option 1 --> "OPACAllowUserToChooseBranch" = Don't allow Option 2 --> "OPACAllowUserToChooseBranch" = Allow for all branches --> "Opac-reserve.pl" calls for "GetBranchesLoop" Option 3 --> "OPACAllowUserToChooseBranch" = Allow for branches with holds --> "Opac-reserve.pl" calls for a new setting, "GetPickUpBranches" for example, which only selects branches with holds.
This would be helpful for us. We have a location for "Download" where we put all of our Overdrive titles. Recently we have had patrons put a hold on a physical book and change the pickup location to "Download". We'd like to be able to take "Download" off the list of pickup locations that they can choose from. It would be sufficient for us if there was a choice when you were defining the library (Administration/Libraries and Groups) for Pickup location - yes or no. Thanks! Peggy
Created attachment 60014 [details] [review] Bug 7534: Add new column "pickup_location" to branches This patch adds a new column "pickup_location" for each library. This value defines whether a library can be used as a pickup location or not. For extended configurability, this flag could perhaps be considered as a part of issuing rules, but as of now, this patch only offers a simple flag into each library. This method also allows easy way for REST API to determine valid pickup locations by querying the /libraries endpoint. To test: 1. perl installer/data/mysql/updatedatabase.pl 2. Observe DEV atomic update: bug_7534.perl Upgrade to XXX done (Bug 7534 - Let libraries have configuration for pickup locations)
Created attachment 60015 [details] [review] Bug 7534: Add method Koha::Template::Plugin::Branches->pickup_locations This patch adds a new method Koha::Template::Plugin::Branches->pickup_locations. Unit tests included. To test: 1. prove t/db_dependent/Template/Plugin/Branches.t
Created attachment 60016 [details] [review] Bug 7534: Add configuration to admin/branches.pl This patch adds a configuration option for pickup locations. To test: 1. Apply patch 2. Go to cgi-bin/koha/admin/branches.pl 3. Observe there is a new column "Pickup location" 4. Click "Edit" for any library 5. Scroll to bottom of the page and select "No" 6. Click "Submit" 7. Observe your library in Libraries-table, notice the value of "Pickup location" has changed to "No"
Created attachment 60017 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list
Created attachment 60018 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go place a hold in intranet 4. See the provided "Pickup at" list 5. Observe the library that you configured is not present in the list 6. Place the hold 7. See list of existing holds on that biblio 8. See "Pickup library" column and observe your configured library is not included in the list
(In reply to Peggy Thrasher from comment #3) > This would be helpful for us. We have a location for "Download" where we > put all of our Overdrive titles. Recently we have had patrons put a hold on > a physical book and change the pickup location to "Download". We'd like to > be able to take "Download" off the list of pickup locations that they can > choose from. > It would be sufficient for us if there was a choice when you were defining > the library (Administration/Libraries and Groups) for Pickup location - yes > or no. > > Thanks! > Peggy Hi! I wrote patches that implement your suggestion. Could you test it? We have the same need for configuring available pickup locations. Thanks!
Created attachment 60022 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list
Created attachment 60023 [details] [review] Bug 7534: Display pickup locations instead of all libraries in request.pl This patch sets request.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go place a hold in intranet 4. See the provided "Pickup at" list 5. Observe the library that you configured is not present in the list 6. Place the hold 7. See list of existing holds on that biblio 8. See "Pickup library" column and observe your configured library is not included in the list
Applying patches, failed to merge changes for "Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl" Failed to merge in changes.
Created attachment 60781 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list
(In reply to Chris Kirby from comment #12) > Applying patches, failed to merge changes for > "Bug 7534: Display pickup locations instead of all libraries in > opac-reserve.pl" > > Failed to merge in changes. Thanks for reporting! I fixed the conflict as promised yesterday in IRC. Does it apply now?
Conflict is now fixed. Prior to rebase, I ran perl installer/data/mysql/updatedatabase.pl prove t/db_dependent/Template/Plugin/Branches.t results in "All tests successful" However, Going to cgi-bin/koha/admin/branches.pl causes "internal server error".
(In reply to Chris Kirby from comment #15) > Conflict is now fixed. > Prior to rebase, I ran perl installer/data/mysql/updatedatabase.pl > > prove t/db_dependent/Template/Plugin/Branches.t results in > "All tests successful" > > However, Going to cgi-bin/koha/admin/branches.pl > causes "internal server error". Thank you for the details. I can't reproduce this issue. Is there a more detailed description of the error in the log files?
I don't get the "internal server error" on an old ubuntu system (14.04 LTS) but I DO get it on kohadevbox with a Windows host and Debian Jessie guest. On the Kohadevbox, Debian Jessie, koha-plack-err: Template process failed: undef error- The method pickup_location is not covered by tests! at /usr/share/koha/lib/C4/Templates.pm line 121.
Created attachment 60794 [details] [review] Bug 7534: Add new column "pickup_location" to branches This patch adds a new column "pickup_location" for each library. This value defines whether a library can be used as a pickup location or not. For extended configurability, this flag could perhaps be considered as a part of issuing rules, but as of now, this patch only offers a simple flag into each library. This method also allows easy way for REST API to determine valid pickup locations by querying the /libraries endpoint. To test: 1. perl installer/data/mysql/updatedatabase.pl 2. Observe DEV atomic update: bug_7534.perl Upgrade to XXX done (Bug 7534 - Let libraries have configuration for pickup locations) https://bugs.koha-community.org/show_bug.cgi?id=7354
Created attachment 60795 [details] [review] Bug 7534: Add method Koha::Template::Plugin::Branches->pickup_locations This patch adds a new method Koha::Template::Plugin::Branches->pickup_locations. Unit tests included. To test: 1. prove t/db_dependent/Template/Plugin/Branches.t
Created attachment 60796 [details] [review] Bug 7534: Add configuration to admin/branches.pl This patch adds a configuration option for pickup locations. To test: 1. Apply patch 2. Go to cgi-bin/koha/admin/branches.pl 3. Observe there is a new column "Pickup location" 4. Click "Edit" for any library 5. Scroll to bottom of the page and select "No" 6. Click "Submit" 7. Observe your library in Libraries-table, notice the value of "Pickup location" has changed to "No"
Created attachment 60797 [details] [review] Bug 7534: Display pickup locations instead of all libraries in request.pl This patch sets request.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go place a hold in intranet 4. See the provided "Pickup at" list 5. Observe the library that you configured is not present in the list 6. Place the hold 7. See list of existing holds on that biblio 8. See "Pickup library" column and observe your configured library is not included in the list
Created attachment 60798 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list
Created attachment 60799 [details] [review] Bug 7534: Add pickup_location to kohastructure.sql
Changed pickup_location column type to TINYINT(1) since that's what we generally use for "booleans" and added it to kohastructure.sql (forgot to add it there before!) (In reply to Chris Kirby from comment #17) > I don't get the "internal server error" on an old ubuntu system (14.04 LTS) > but I DO get it on kohadevbox with a Windows host and Debian Jessie guest. > > On the Kohadevbox, Debian Jessie, > koha-plack-err: > Template process failed: undef error- The method pickup_location is not > covered by tests! at /usr/share/koha/lib/C4/Templates.pm line 121. Sent you a message on IRC!
Hi Lari, On my kohadevbox, I am still getting plack errors: Template process failed: undef error - The method pickup_location is not covered by tests! at /usr/share/koha/lib/C4/Templates.pm line 121. If there is something else you would like me to try testing for this, let me know.
Created attachment 60878 [details] [review] Bug 7534: Add new column "pickup_location" to branches This patch adds a new column "pickup_location" for each library. This value defines whether a library can be used as a pickup location or not. For extended configurability, this flag could perhaps be considered as a part of issuing rules, but as of now, this patch only offers a simple flag into each library. This method also allows easy way for REST API to determine valid pickup locations by querying the /libraries endpoint. To test: 1. perl installer/data/mysql/updatedatabase.pl 2. Observe DEV atomic update: bug_7534.perl Upgrade to XXX done (Bug 7534 - Let libraries have configuration for pickup locations) https://bugs.koha-community.org/show_bug.cgi?id=7354
Created attachment 60879 [details] [review] Bug 7534: Use search parameters for Koha::Template::Plugin::Branches->all This lets us query libraries with additional search parameters and is useful for this particular Bug by allowing us to select pickup locations. Unit tests included. To test: 1. prove t/db_dependent/Template/Plugin/Branches.t
Created attachment 60880 [details] [review] Bug 7534: Add configuration to admin/branches.pl This patch adds a configuration option for pickup locations. To test: 1. Apply patch 2. Go to cgi-bin/koha/admin/branches.pl 3. Observe there is a new column "Pickup location" 4. Click "Edit" for any library 5. Scroll to bottom of the page and select "No" 6. Click "Submit" 7. Observe your library in Libraries-table, notice the value of "Pickup location" has changed to "No"
Created attachment 60881 [details] [review] Bug 7534: Display pickup locations instead of all libraries in request.pl This patch sets request.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go place a hold in intranet 4. See the provided "Pickup at" list 5. Observe the library that you configured is not present in the list 6. Place the hold 7. See list of existing holds on that biblio 8. See "Pickup library" column and observe your configured library is not included in the list
Created attachment 60882 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list
Created attachment 60883 [details] [review] Bug 7534: (QA-follow-up) Default pickup location to Yes when adding a new library To test: 1. Apply the patches before this one 2. Go to /cgi-bin/koha/admin/branches.pl 3. Press New library button 4. Scroll down the page and observe Pickup location defaults to No 5. Apply this patch 6. Go to /cgi-bin/koha/admin/branches.pl 7. Press New library button 8. Scroll down the page and observe Pickup location now defaults to Yes
- Rebased on master - Removed Koha::Template::Plugin::Branches->pickup_locations and replaced it by adding ability to use search parameters in all. The removed function is used in Bug 7614 and therefore should not be added in this bug yet. - Fixed a bug, reported by Jonathan, when adding a new library the pickup location selection would default to "No".
Test on sandbox1 ByWater Solutions This patch adds a configuration option for pickup locations. To test: 1. Apply patch 2. Go to cgi-bin/koha/admin/branches.pl 3. Observe there is a new column "Pickup location" 4. Click "Edit" for any library 5. Scroll to bottom of the page and select "No" 6. Click "Submit" 7. Observe your library in Libraries-table, notice the value of "Pickup location" has changed to "No" --> OK This patch sets request.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go place a hold in intranet 4. See the provided "Pickup at" list 5. Observe the library that you configured is not present in the list 6. Place the hold 7. See list of existing holds on that biblio 8. See "Pickup library" column and observe your configured library is not included in the list --> OK This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list --> OK To test: 1. Apply the patches before this one 2. Go to /cgi-bin/koha/admin/branches.pl 3. Press New library button 4. Scroll down the page and observe Pickup location defaults to No 5. Apply this patch 6. Go to /cgi-bin/koha/admin/branches.pl 7. Press New library button 8. Scroll down the page and observe Pickup location now defaults to Yes --> OK I don't change status to signed off because I can't test on sandbox 2 elements : https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7534#c18 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7534#c19
(In reply to Koha Team AMU from comment #33) > I don't change status to signed off because I can't test on sandbox 2 > elements : > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7534#c18 This is done automatically on a sandbox. > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7534#c19 This is for the QA step. Go ahead :)
(In reply to Jonathan Druart from comment #34) > (In reply to Koha Team AMU from comment #33) > > I don't change status to signed off because I can't test on sandbox 2 > > elements : > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7534#c18 > > This is done automatically on a sandbox. > > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7534#c19 > > This is for the QA step. > > Go ahead :) Thank you very much for the explanations ! :-) So, it works as expected and I change status to signed off ! :-)
Lari, I think we need a check server-side to make sure a patron will not inject a library that is not in the list.
Created attachment 61044 [details] [review] Bug 7534: Validate pickup location in CanBook/ItemBeReserved This patch adds $branchcode_to parameter to CanBookBeReserved and CanItemBeReserved. It represents the pickup location for the hold. To test: 1. prove t/db_dependent/Holds.t
Created attachment 61045 [details] [review] Bug 7534: Check hold availability to desired pickup location in opac-reserve.pl To test: -1. Have access to your browser's developer tools in order to modify <select> dropdown values 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No". Remember the branchcode of this library! 3. Go place a hold in OPAC 4. See the provided "Pick up location" list 5. Observe the library that you configured is not present in the list 6. You should see another library selected by default. Right click that and in Firefox/Chrome click "Inspect element" 7. You should see a list of <option value="xxxx">blabla</option> elements 8. Double click between value (xxxx in above example) and replace the value with the branchcode you remember from step 2. 9. Place the hold 10. Observe that you are taken to cgi-bin/koha/opac-user.pl but your hold was not successful. 11. Go back to place a hold and this time do not modify any values. 12. Observe that a hold is now placed.
(In reply to Jonathan Druart from comment #36) > Lari, I think we need a check server-side to make sure a patron will not > inject a library that is not in the list. Agreed. This was done in Bug 7614, but as it should be already in this Bug, I took the patches from 7614 and rewrote them to be suitable in 7534.
Created attachment 61046 [details] [review] Bug 7534: Validate pickup location in CanBook/ItemBeReserved This patch adds $branchcode_to parameter to CanBookBeReserved and CanItemBeReserved. It represents the pickup location for the hold. To test: 1. prove t/db_dependent/Holds.t
Created attachment 61047 [details] [review] Bug 7534: Check hold availability to desired pickup location in opac-reserve.pl To test: -1. Have access to your browser's developer tools in order to modify <select> dropdown values 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No". Remember the branchcode of this library! 3. Go place a hold in OPAC 4. See the provided "Pick up location" list 5. Observe the library that you configured is not present in the list 6. You should see another library selected by default. Right click that and in Firefox/Chrome click "Inspect element" 7. You should see a list of <option value="xxxx">blabla</option> elements 8. Double click between value (xxxx in above example) and replace the value with the branchcode you remember from step 2. 9. Place the hold 10. Observe that you are taken to cgi-bin/koha/opac-user.pl but your hold was not successful. 11. Go back to place a hold and this time do not modify any values. 12. Observe that a hold is now placed.
Patch tested with a sandbox, by Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 61273 [details] [review] Bug 7534: Add new column "pickup_location" to branches This patch adds a new column "pickup_location" for each library. This value defines whether a library can be used as a pickup location or not. For extended configurability, this flag could perhaps be considered as a part of issuing rules, but as of now, this patch only offers a simple flag into each library. This method also allows easy way for REST API to determine valid pickup locations by querying the /libraries endpoint. To test: 1. perl installer/data/mysql/updatedatabase.pl 2. Observe DEV atomic update: bug_7534.perl Upgrade to XXX done (Bug 7534 - Let libraries have configuration for pickup locations) https://bugs.koha-community.org/show_bug.cgi?id=7354 Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 61274 [details] [review] Bug 7534: Use search parameters for Koha::Template::Plugin::Branches->all This lets us query libraries with additional search parameters and is useful for this particular Bug by allowing us to select pickup locations. Unit tests included. To test: 1. prove t/db_dependent/Template/Plugin/Branches.t Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 61275 [details] [review] Bug 7534: Add configuration to admin/branches.pl This patch adds a configuration option for pickup locations. To test: 1. Apply patch 2. Go to cgi-bin/koha/admin/branches.pl 3. Observe there is a new column "Pickup location" 4. Click "Edit" for any library 5. Scroll to bottom of the page and select "No" 6. Click "Submit" 7. Observe your library in Libraries-table, notice the value of "Pickup location" has changed to "No" Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 61276 [details] [review] Bug 7534: Display pickup locations instead of all libraries in request.pl This patch sets request.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go place a hold in intranet 4. See the provided "Pickup at" list 5. Observe the library that you configured is not present in the list 6. Place the hold 7. See list of existing holds on that biblio 8. See "Pickup library" column and observe your configured library is not included in the list Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 61277 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 61278 [details] [review] Bug 7534: (QA-follow-up) Default pickup location to Yes when adding a new library To test: 1. Apply the patches before this one 2. Go to /cgi-bin/koha/admin/branches.pl 3. Press New library button 4. Scroll down the page and observe Pickup location defaults to No 5. Apply this patch 6. Go to /cgi-bin/koha/admin/branches.pl 7. Press New library button 8. Scroll down the page and observe Pickup location now defaults to Yes Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 61279 [details] [review] Bug 7534: Validate pickup location in CanBook/ItemBeReserved This patch adds $branchcode_to parameter to CanBookBeReserved and CanItemBeReserved. It represents the pickup location for the hold. To test: 1. prove t/db_dependent/Holds.t Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 61280 [details] [review] Bug 7534: Check hold availability to desired pickup location in opac-reserve.pl To test: -1. Have access to your browser's developer tools in order to modify <select> dropdown values 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No". Remember the branchcode of this library! 3. Go place a hold in OPAC 4. See the provided "Pick up location" list 5. Observe the library that you configured is not present in the list 6. You should see another library selected by default. Right click that and in Firefox/Chrome click "Inspect element" 7. You should see a list of <option value="xxxx">blabla</option> elements 8. Double click between value (xxxx in above example) and replace the value with the branchcode you remember from step 2. 9. Place the hold 10. Observe that you are taken to cgi-bin/koha/opac-user.pl but your hold was not successful. 11. Go back to place a hold and this time do not modify any values. 12. Observe that a hold is now placed. Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Works and tests pass The updatedatabase patch has changes to the Schema files, these should be removed
And minor: CanBookBeReserved you say $branchcode CanItemBeReseerved you say $branchcode_to Second is more clear, but first is more standard
Created attachment 77847 [details] [review] Bug 7534: Add new column "pickup_location" to branches This patch adds a new column "pickup_location" for each library. This value defines whether a library can be used as a pickup location or not. For extended configurability, this flag could perhaps be considered as a part of issuing rules, but as of now, this patch only offers a simple flag into each library. This method also allows easy way for REST API to determine valid pickup locations by querying the /libraries endpoint. To test: 1. perl installer/data/mysql/updatedatabase.pl 2. Observe DEV atomic update: bug_7534.perl Upgrade to XXX done (Bug 7534 - Let libraries have configuration for pickup locations) https://bugs.koha-community.org/show_bug.cgi?id=7354 Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 77848 [details] [review] Bug 7534: Use search parameters for Koha::Template::Plugin::Branches->all This lets us query libraries with additional search parameters and is useful for this particular Bug by allowing us to select pickup locations. Unit tests included. To test: 1. prove t/db_dependent/Template/Plugin/Branches.t Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 77849 [details] [review] Bug 7534: Add configuration to admin/branches.pl This patch adds a configuration option for pickup locations. To test: 1. Apply patch 2. Go to cgi-bin/koha/admin/branches.pl 3. Observe there is a new column "Pickup location" 4. Click "Edit" for any library 5. Scroll to bottom of the page and select "No" 6. Click "Submit" 7. Observe your library in Libraries-table, notice the value of "Pickup location" has changed to "No" Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 77850 [details] [review] Bug 7534: Display pickup locations instead of all libraries in request.pl This patch sets request.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go place a hold in intranet 4. See the provided "Pickup at" list 5. Observe the library that you configured is not present in the list 6. Place the hold 7. See list of existing holds on that biblio 8. See "Pickup library" column and observe your configured library is not included in the list Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 77851 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 77852 [details] [review] Bug 7534: (QA-follow-up) Default pickup location to Yes when adding a new library To test: 1. Apply the patches before this one 2. Go to /cgi-bin/koha/admin/branches.pl 3. Press New library button 4. Scroll down the page and observe Pickup location defaults to No 5. Apply this patch 6. Go to /cgi-bin/koha/admin/branches.pl 7. Press New library button 8. Scroll down the page and observe Pickup location now defaults to Yes Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 77853 [details] [review] Bug 7534: Validate pickup location in CanBook/ItemBeReserved This patch adds $branchcode_to parameter to CanBookBeReserved and CanItemBeReserved. It represents the pickup location for the hold. To test: 1. prove t/db_dependent/Holds.t Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 77854 [details] [review] Bug 7534: Check hold availability to desired pickup location in opac-reserve.pl To test: -1. Have access to your browser's developer tools in order to modify <select> dropdown values 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No". Remember the branchcode of this library! 3. Go place a hold in OPAC 4. See the provided "Pick up location" list 5. Observe the library that you configured is not present in the list 6. You should see another library selected by default. Right click that and in Firefox/Chrome click "Inspect element" 7. You should see a list of <option value="xxxx">blabla</option> elements 8. Double click between value (xxxx in above example) and replace the value with the branchcode you remember from step 2. 9. Place the hold 10. Observe that you are taken to cgi-bin/koha/opac-user.pl but your hold was not successful. 11. Go back to place a hold and this time do not modify any values. 12. Observe that a hold is now placed. Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 77855 [details] [review] Bug 7534: Fix number of tests for Holds.t
Created attachment 77856 [details] [review] Bug 7534: Disambiguate branchcode parameter, make it match between subroutines
Created attachment 78160 [details] [review] Bug 7534: Add new column "pickup_location" to branches This patch adds a new column "pickup_location" for each library. This value defines whether a library can be used as a pickup location or not. For extended configurability, this flag could perhaps be considered as a part of issuing rules, but as of now, this patch only offers a simple flag into each library. This method also allows easy way for REST API to determine valid pickup locations by querying the /libraries endpoint. To test: 1. perl installer/data/mysql/updatedatabase.pl 2. Observe DEV atomic update: bug_7534.perl Upgrade to XXX done (Bug 7534 - Let libraries have configuration for pickup locations) https://bugs.koha-community.org/show_bug.cgi?id=7354 Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78161 [details] [review] Bug 7534: Add new column "pickup_location" to branches This patch adds a new column "pickup_location" for each library. This value defines whether a library can be used as a pickup location or not. For extended configurability, this flag could perhaps be considered as a part of issuing rules, but as of now, this patch only offers a simple flag into each library. This method also allows easy way for REST API to determine valid pickup locations by querying the /libraries endpoint. To test: 1. perl installer/data/mysql/updatedatabase.pl 2. Observe DEV atomic update: bug_7534.perl Upgrade to XXX done (Bug 7534 - Let libraries have configuration for pickup locations) https://bugs.koha-community.org/show_bug.cgi?id=7354 Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78162 [details] [review] Bug 7534: Use search parameters for Koha::Template::Plugin::Branches->all This lets us query libraries with additional search parameters and is useful for this particular Bug by allowing us to select pickup locations. Unit tests included. To test: 1. prove t/db_dependent/Template/Plugin/Branches.t Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78163 [details] [review] Bug 7534: Add configuration to admin/branches.pl This patch adds a configuration option for pickup locations. To test: 1. Apply patch 2. Go to cgi-bin/koha/admin/branches.pl 3. Observe there is a new column "Pickup location" 4. Click "Edit" for any library 5. Scroll to bottom of the page and select "No" 6. Click "Submit" 7. Observe your library in Libraries-table, notice the value of "Pickup location" has changed to "No" Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78164 [details] [review] Bug 7534: Display pickup locations instead of all libraries in request.pl This patch sets request.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go place a hold in intranet 4. See the provided "Pickup at" list 5. Observe the library that you configured is not present in the list 6. Place the hold 7. See list of existing holds on that biblio 8. See "Pickup library" column and observe your configured library is not included in the list Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78165 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78166 [details] [review] Bug 7534: (QA-follow-up) Default pickup location to Yes when adding a new library To test: 1. Apply the patches before this one 2. Go to /cgi-bin/koha/admin/branches.pl 3. Press New library button 4. Scroll down the page and observe Pickup location defaults to No 5. Apply this patch 6. Go to /cgi-bin/koha/admin/branches.pl 7. Press New library button 8. Scroll down the page and observe Pickup location now defaults to Yes Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78167 [details] [review] Bug 7534: Validate pickup location in CanBook/ItemBeReserved This patch adds $branchcode_to parameter to CanBookBeReserved and CanItemBeReserved. It represents the pickup location for the hold. To test: 1. prove t/db_dependent/Holds.t Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78168 [details] [review] Bug 7534: Check hold availability to desired pickup location in opac-reserve.pl To test: -1. Have access to your browser's developer tools in order to modify <select> dropdown values 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No". Remember the branchcode of this library! 3. Go place a hold in OPAC 4. See the provided "Pick up location" list 5. Observe the library that you configured is not present in the list 6. You should see another library selected by default. Right click that and in Firefox/Chrome click "Inspect element" 7. You should see a list of <option value="xxxx">blabla</option> elements 8. Double click between value (xxxx in above example) and replace the value with the branchcode you remember from step 2. 9. Place the hold 10. Observe that you are taken to cgi-bin/koha/opac-user.pl but your hold was not successful. 11. Go back to place a hold and this time do not modify any values. 12. Observe that a hold is now placed. Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78169 [details] [review] Bug 7534: Fix number of tests for Holds.t
Created attachment 78170 [details] [review] Bug 7534: Disambiguate branchcode parameter, make it match between subroutines
Created attachment 78171 [details] [review] Bug 7534: (RM follow-up) Fix tests and adjust after bug 15524
In testing I set the users branch to 'no' for pickup_location I found the user could then not place any holds in the opac. I am wondering if the call to 'CanBookBeReserved' in opac-reserve.pl should include banchcode or not? It seems even if the pickup location is not allowed the borrower should be able to pickup holds elsewhere. Rebased and adjusted on top of 15524, please take a look as well and let me know if all makes sense.
Created attachment 78477 [details] [review] Bug 7534: Add new column "pickup_location" to branches This patch adds a new column "pickup_location" for each library. This value defines whether a library can be used as a pickup location or not. For extended configurability, this flag could perhaps be considered as a part of issuing rules, but as of now, this patch only offers a simple flag into each library. This method also allows easy way for REST API to determine valid pickup locations by querying the /libraries endpoint. To test: 1. perl installer/data/mysql/updatedatabase.pl 2. Observe DEV atomic update: bug_7534.perl Upgrade to XXX done (Bug 7534 - Let libraries have configuration for pickup locations) https://bugs.koha-community.org/show_bug.cgi?id=7354 Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78478 [details] [review] Bug 7534: Use search parameters for Koha::Template::Plugin::Branches->all This lets us query libraries with additional search parameters and is useful for this particular Bug by allowing us to select pickup locations. Unit tests included. To test: 1. prove t/db_dependent/Template/Plugin/Branches.t Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78479 [details] [review] Bug 7534: Add configuration to admin/branches.pl This patch adds a configuration option for pickup locations. To test: 1. Apply patch 2. Go to cgi-bin/koha/admin/branches.pl 3. Observe there is a new column "Pickup location" 4. Click "Edit" for any library 5. Scroll to bottom of the page and select "No" 6. Click "Submit" 7. Observe your library in Libraries-table, notice the value of "Pickup location" has changed to "No" Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78480 [details] [review] Bug 7534: Display pickup locations instead of all libraries in request.pl This patch sets request.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go place a hold in intranet 4. See the provided "Pickup at" list 5. Observe the library that you configured is not present in the list 6. Place the hold 7. See list of existing holds on that biblio 8. See "Pickup library" column and observe your configured library is not included in the list Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78481 [details] [review] Bug 7534: Display pickup locations instead of all libraries in opac-reserve.pl This patch sets opac-reserve.tt to use the list of pickup libraries instead of every library in the system. To test: 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No" 3. Go to OPAC and place a hold 4. See the provided Pickup location list 5. Observe the library that you configured is not present in the list Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78482 [details] [review] Bug 7534: (QA-follow-up) Default pickup location to Yes when adding a new library To test: 1. Apply the patches before this one 2. Go to /cgi-bin/koha/admin/branches.pl 3. Press New library button 4. Scroll down the page and observe Pickup location defaults to No 5. Apply this patch 6. Go to /cgi-bin/koha/admin/branches.pl 7. Press New library button 8. Scroll down the page and observe Pickup location now defaults to Yes Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78483 [details] [review] Bug 7534: Validate pickup location in CanBook/ItemBeReserved This patch adds $branchcode_to parameter to CanBookBeReserved and CanItemBeReserved. It represents the pickup location for the hold. To test: 1. prove t/db_dependent/Holds.t Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78484 [details] [review] Bug 7534: Check hold availability to desired pickup location in opac-reserve.pl To test: -1. Have access to your browser's developer tools in order to modify <select> dropdown values 1. Go to cgi-bin/koha/admin/branches.pl 2. Configure one of your libraries to "Pickup location" => "No". Remember the branchcode of this library! 3. Go place a hold in OPAC 4. See the provided "Pick up location" list 5. Observe the library that you configured is not present in the list 6. You should see another library selected by default. Right click that and in Firefox/Chrome click "Inspect element" 7. You should see a list of <option value="xxxx">blabla</option> elements 8. Double click between value (xxxx in above example) and replace the value with the branchcode you remember from step 2. 9. Place the hold 10. Observe that you are taken to cgi-bin/koha/opac-user.pl but your hold was not successful. 11. Go back to place a hold and this time do not modify any values. 12. Observe that a hold is now placed. Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr>
Created attachment 78485 [details] [review] Bug 7534: Fix number of tests for Holds.t
Created attachment 78486 [details] [review] Bug 7534: Disambiguate branchcode parameter, make it match between subroutines
Created attachment 78487 [details] [review] Bug 7534: (RM follow-up) Fix tests and adjust after bug 15524
Created attachment 78488 [details] [review] Bug 7534 [QA Followup]: Don't do pickup branch checking for determining holdability in the OPAC
Created attachment 78489 [details] [review] Bug 7534 [QA Followup]: Don't do pickup branch checking for determining holdability in the OPAC
Awesome work all! Pushed to master for 18.11
Created attachment 78495 [details] [review] Bug 7534: (RM follow-up) Fix TT syntax
(In reply to Nick Clemens from comment #90) > Created attachment 78495 [details] [review] [review] > Bug 7534: (RM follow-up) Fix TT syntax Followup pushed to master
Created attachment 78540 [details] [review] Bug 7534: (QA followup) Disable priority pulldowns when using split holds queue
Enhancement, will not be backported to 18.05.x series.
Created attachment 78548 [details] [review] Bug 7534: (QA follow-up) Use Koha.Preference template plugin to fetch the pref's value Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Jonathan Druart from comment #94) > Created attachment 78548 [details] [review] [review] > Bug 7534: (QA follow-up) Use Koha.Preference template plugin to fetch the > pref's value > > Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Follow-up pushed to master, thanks Jonathan!
Created attachment 84852 [details] [review] Bug 7534: (QA Follow-up) Fix the return value for the new format, it should be a hashref, not a string
It looks like this development changed from the initial description, updating bug title.