Description
Nick Clemens (kidclamp)
2021-09-14 13:33:17 UTC
Created attachment 124871 [details] [review] Bug 29015: Add options for itemtpye, collection, and shelving location to view_holdsqueue.pl This patch makes the code for itemtypeslimit work, and adds options for shelving location and collection code This also remove the 'post' method from the form to allow easy bookmarking To test: 1 - Add holds to your system 2 - Run the holds queue builder 3 - Browse to Circulation->Holds queue 4 - Note the library dropdown 5 - Apply patch 6 - Reload and note new options 7 - Test that both limits and 'All' options work as expected 8 - Note that description at top includes options when selected "### items found for All libraries and item type:(Books)" Created attachment 124881 [details] [review] Bug 29015: Unit tests Created attachment 124883 [details] [review] Bug 29015: (follow-up) Show sidebar filter form with results This patch adds the new filter form in the sidebar when showing results. To do so the form markup is moved into a BLOCK so that it can be reused. This patch also adds pre-selection of submitted options on the filter form so that it reflects the user's choices. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Go to Circulation -> Holds queue. - Submit the form with one or more filters selected. - On the results page the queue should be correctly filtered and the sidebar should show your search fields preselected. - Test with the CircSidebar preference enabled and disabled. The circulation menu should appear correctly, with the filter form only displaying in the sidebar after submitting the form. I think the original patches work well, and I hope my follow-up makes it even better. I do have one request because I think as it is this patch changes a behavior that libraries depend on: The form when it is initially displayed should pre-select the logged-in user's home library. Created attachment 124903 [details] [review] Bug 29015: (follow-up) Default to logged in branch unless viewing queue Created attachment 124907 [details] [review] Bug 29015: Add options for itemtpye, collection, and shelving location to view_holdsqueue.pl This patch makes the code for itemtypeslimit work, and adds options for shelving location and collection code This also remove the 'post' method from the form to allow easy bookmarking To test: 1 - Add holds to your system 2 - Run the holds queue builder 3 - Browse to Circulation->Holds queue 4 - Note the library dropdown 5 - Apply patch 6 - Reload and note new options 7 - Test that both limits and 'All' options work as expected 8 - Note that description at top includes options when selected "### items found for All libraries and item type:(Books)" Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 124908 [details] [review] Bug 29015: Unit tests Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 124909 [details] [review] Bug 29015: (follow-up) Show sidebar filter form with results This patch adds the new filter form in the sidebar when showing results. To do so the form markup is moved into a BLOCK so that it can be reused. This patch also adds pre-selection of submitted options on the filter form so that it reflects the user's choices. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Go to Circulation -> Holds queue. - Submit the form with one or more filters selected. - On the results page the queue should be correctly filtered and the sidebar should show your search fields preselected. - Test with the CircSidebar preference enabled and disabled. The circulation menu should appear correctly, with the filter form only displaying in the sidebar after submitting the form. Created attachment 124910 [details] [review] Bug 29015: (follow-up) Default to logged in branch unless viewing queue Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 124915 [details] [review] Bug 29015: Add options for itemtpye, collection, and shelving location to view_holdsqueue.pl This patch makes the code for itemtypeslimit work, and adds options for shelving location and collection code This also remove the 'post' method from the form to allow easy bookmarking To test: 1 - Add holds to your system 2 - Run the holds queue builder 3 - Browse to Circulation->Holds queue 4 - Note the library dropdown 5 - Apply patch 6 - Reload and note new options 7 - Test that both limits and 'All' options work as expected 8 - Note that description at top includes options when selected "### items found for All libraries and item type:(Books)" Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 124916 [details] [review] Bug 29015: Unit tests Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 124917 [details] [review] Bug 29015: (follow-up) Show sidebar filter form with results This patch adds the new filter form in the sidebar when showing results. To do so the form markup is moved into a BLOCK so that it can be reused. This patch also adds pre-selection of submitted options on the filter form so that it reflects the user's choices. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Go to Circulation -> Holds queue. - Submit the form with one or more filters selected. - On the results page the queue should be correctly filtered and the sidebar should show your search fields preselected. - Test with the CircSidebar preference enabled and disabled. The circulation menu should appear correctly, with the filter form only displaying in the sidebar after submitting the form. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 124918 [details] [review] Bug 29015: (follow-up) Default to logged in branch unless viewing queue Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 125419 [details] [review] Bug 29015: Add options for itemtpye, collection, and shelving location to view_holdsqueue.pl This patch makes the code for itemtypeslimit work, and adds options for shelving location and collection code This also remove the 'post' method from the form to allow easy bookmarking To test: 1 - Add holds to your system 2 - Run the holds queue builder 3 - Browse to Circulation->Holds queue 4 - Note the library dropdown 5 - Apply patch 6 - Reload and note new options 7 - Test that both limits and 'All' options work as expected 8 - Note that description at top includes options when selected "### items found for All libraries and item type:(Books)" Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 125420 [details] [review] Bug 29015: Add options for itemtype, collection, and shelving location to view_holdsqueue.pl This patch makes the code for itemtypeslimit work, and adds options for shelving location and collection code This also remove the 'post' method from the form to allow easy bookmarking To test: 1 - Add holds to your system 2 - Run the holds queue builder 3 - Browse to Circulation->Holds queue 4 - Note the library dropdown 5 - Apply patch 6 - Reload and note new options 7 - Test that both limits and 'All' options work as expected 8 - Note that description at top includes options when selected "### items found for All libraries and item type:(Books)" Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 125421 [details] [review] Bug 29015: Unit tests Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 125422 [details] [review] Bug 29015: (follow-up) Show sidebar filter form with results This patch adds the new filter form in the sidebar when showing results. To do so the form markup is moved into a BLOCK so that it can be reused. This patch also adds pre-selection of submitted options on the filter form so that it reflects the user's choices. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Go to Circulation -> Holds queue. - Submit the form with one or more filters selected. - On the results page the queue should be correctly filtered and the sidebar should show your search fields preselected. - Test with the CircSidebar preference enabled and disabled. The circulation menu should appear correctly, with the filter form only displaying in the sidebar after submitting the form. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 125423 [details] [review] Bug 29015: (follow-up) Default to logged in branch unless viewing queue Signed-off-by: Owen Leonard <oleonard@myacpl.org> The tests are failing for me, can you please check? kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/HoldsQueue.t t/db_dependent/HoldsQueue.t .. 56/58 Use of uninitialized value in hash element at /home/vagrant/kohaclone/C4/HoldsQueue.pm line 466. # No tests run! # Failed test 'No tests run for subtest "Remove holds on check-in match"' # at t/db_dependent/HoldsQueue.t line 1739. Can't call method "branchcode" on an undefined value at /home/vagrant/kohaclone/Koha/Item.pm line 664. # Looks like your test exited with 255 just after 57. t/db_dependent/HoldsQueue.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 2/58 subtests Test Summary Report ------------------- t/db_dependent/HoldsQueue.t (Wstat: 65280 Tests: 57 Failed: 1) Failed test: 57 Non-zero exit status: 255 Parse errors: Bad plan. You planned 58 tests but ran 57. I don't recreate failure, it looks like you have a hold with no pickup location on your system Testing this again and all seems to work as advertised, but there are some things that keep irritating me (unrelated to this patch, so not blocker): * If I have a record level hold and I have 2 items for the record, that are identical apart from collection, how is the collection that shows on holds queue chosen? Only one shows and I can only filter on the one that shows... * We can limit on library, so then I know which library I am looking at. But... when I choose "All", there seems to be no clue in the table about the library that owns the item and is supposed to provide it? Created attachment 127191 [details] [review] Bug 29015: (follow-up) Show sidebar filter form with results This patch adds the new filter form in the sidebar when showing results. To do so the form markup is moved into a BLOCK so that it can be reused. This patch also adds pre-selection of submitted options on the filter form so that it reflects the user's choices. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Go to Circulation -> Holds queue. - Submit the form with one or more filters selected. - On the results page the queue should be correctly filtered and the sidebar should show your search fields preselected. - Test with the CircSidebar preference enabled and disabled. The circulation menu should appear correctly, with the filter form only displaying in the sidebar after submitting the form. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 127192 [details] [review] Bug 29015: (follow-up) Default to logged in branch unless viewing queue Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 127193 [details] [review] Bug 29015: (QA follow-up) Change collection code to be just collection We did some clean-up in that area a little while ago, agreeing that as we acutally display the descriptions, the label should be just "collection". This patch also removes some (): Before: 4 items found for Centerville and item type:(Books) and collection: (Reference) and shelving location: (General Stacks) Now: 4 items found for Centerville and item type: Books and collection: Reference and shelving location: General Stacks Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 127194 [details] [review] Bug 29015: Add options for itemtype, collection, and shelving location to view_holdsqueue.pl This patch makes the code for itemtypeslimit work, and adds options for shelving location and collection code This also remove the 'post' method from the form to allow easy bookmarking To test: 1 - Add holds to your system 2 - Run the holds queue builder 3 - Browse to Circulation->Holds queue 4 - Note the library dropdown 5 - Apply patch 6 - Reload and note new options 7 - Test that both limits and 'All' options work as expected 8 - Note that description at top includes options when selected "### items found for All libraries and item type:(Books)" Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 127195 [details] [review] Bug 29015: Unit tests Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 127196 [details] [review] Bug 29015: (follow-up) Show sidebar filter form with results This patch adds the new filter form in the sidebar when showing results. To do so the form markup is moved into a BLOCK so that it can be reused. This patch also adds pre-selection of submitted options on the filter form so that it reflects the user's choices. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Go to Circulation -> Holds queue. - Submit the form with one or more filters selected. - On the results page the queue should be correctly filtered and the sidebar should show your search fields preselected. - Test with the CircSidebar preference enabled and disabled. The circulation menu should appear correctly, with the filter form only displaying in the sidebar after submitting the form. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 127197 [details] [review] Bug 29015: (follow-up) Default to logged in branch unless viewing queue Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 127198 [details] [review] Bug 29015: (QA follow-up) Change collection code to be just collection We did some clean-up in that area a little while ago, agreeing that as we acutally display the descriptions, the label should be just "collection". This patch also removes some (): Before: 4 items found for Centerville and item type:(Books) and collection: (Reference) and shelving location: (General Stacks) Now: 4 items found for Centerville and item type: Books and collection: Reference and shelving location: General Stacks Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> (In reply to Katrin Fischer from comment #21) > Testing this again and all seems to work as advertised, but there are some > things that keep irritating me (unrelated to this patch, so not blocker): > > * If I have a record level hold and I have 2 items for the record, that are > identical apart from collection, how is the collection that shows on holds > queue chosen? Only one shows and I can only filter on the one that shows... Yes, the holds queue chooses a single item to fill the hold, so you see the one chosen. The script uses a lot of logic to determine which is the 'best' item, and we choose only one so that only one library attempts to fill the hold > * We can limit on library, so then I know which library I am looking at. > But... when I choose "All", there seems to be no clue in the table about the > library that owns the item and is supposed to provide it? Bug 29389 filed Created attachment 127261 [details] [review] Bug 29015: Unit tests Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> JD Amended patch: perltidy! Pushed to master for 21.11, thanks to everybody involved! |