Bug 27706 - Holds to Pull libraries column filter doesn't work
Summary: Holds to Pull libraries column filter doesn't work
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 24488
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-15 09:04 UTC by Joonas Kylmälä
Modified: 2021-12-13 21:08 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Circulation function:


Attachments
Bug 27706: (bug 24488 follow-up) Fix libraries column filter (1.66 KB, patch)
2021-02-15 09:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27706: (bug 24488 follow-up) Fix libraries column filter (1.71 KB, patch)
2021-02-15 13:57 UTC, Andrii Nugged
Details | Diff | Splinter Review
Bug 27706: (bug 24488 follow-up) Fix libraries column filter (1.86 KB, patch)
2021-02-15 13:59 UTC, Joonas Kylmälä
Details | Diff | Splinter Review

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