Bug 27706

Summary: Holds to Pull libraries column filter doesn't work
Product: Koha Reporter: Joonas Kylmälä <joonas.kylmala>
Component: Hold requestsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, nugged
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Circulation function:
Bug Depends on: 24488    
Bug Blocks:    
Attachments: Bug 27706: (bug 24488 follow-up) Fix libraries column filter
Bug 27706: (bug 24488 follow-up) Fix libraries column filter
Bug 27706: (bug 24488 follow-up) Fix libraries column filter

Description Joonas Kylmälä 2021-02-15 09:04:07 UTC
In page /cgi-bin/koha/circ/pendingreserves.pl if you have multiple different libraries and want to use the Libraries filter in the bottom of the page it doesn't work because of the following Javascript error:

> Uncaught TypeError: $(...).child is not a function

This is regression from bug 24488.
Comment 1 Jonathan Druart 2021-02-15 09:37:21 UTC
Created attachment 116880 [details] [review]
Bug 27706: (bug 24488 follow-up) Fix libraries column filter

From commit 2285c2d65752dcc899d3fdcff634e6927a1cbbf0
     Bug 24488: Show correct first patron details on Holds to pull

               $('select', this).change( function () {
-                  var filter_value = $(this).val();
-                  holdst.fnFilter( filter_value, 5, true );
+                  holdst.fnFilter( $(this).child().val(), 5 );
               });

This does not make sense, we need to filter on $(this).val(), it's a
select element.

Test plan:
Place some holds
Hit the pending holds page
Use the "libraries" column filter and confirm that it works correctly
Comment 2 Andrii Nugged 2021-02-15 13:57:06 UTC
Created attachment 116885 [details] [review]
Bug 27706: (bug 24488 follow-up) Fix libraries column filter

From commit 2285c2d65752dcc899d3fdcff634e6927a1cbbf0
     Bug 24488: Show correct first patron details on Holds to pull

               $('select', this).change( function () {
-                  var filter_value = $(this).val();
-                  holdst.fnFilter( filter_value, 5, true );
+                  holdst.fnFilter( $(this).child().val(), 5 );
               });

This does not make sense, we need to filter on $(this).val(), it's a
select element.

Test plan:
Place some holds
Hit the pending holds page
Use the "libraries" column filter and confirm that it works correctly

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Comment 3 Joonas Kylmälä 2021-02-15 13:59:20 UTC
Created attachment 116886 [details] [review]
Bug 27706: (bug 24488 follow-up) Fix libraries column filter

From commit 2285c2d65752dcc899d3fdcff634e6927a1cbbf0
     Bug 24488: Show correct first patron details on Holds to pull

               $('select', this).change( function () {
-                  var filter_value = $(this).val();
-                  holdst.fnFilter( filter_value, 5, true );
+                  holdst.fnFilter( $(this).child().val(), 5 );
               });

This does not make sense, we need to filter on $(this).val(), it's a
select element.

Test plan:
Place some holds
Hit the pending holds page
Use the "libraries" column filter and confirm that it works correctly

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 4 Jonathan Druart 2021-02-16 09:22:33 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 5 Fridolin Somers 2021-02-19 15:37:17 UTC
Depends on Bug 24488 not in 20.11.x