Bug 33155 - Category and library filters from header patron search not taken into account
Summary: Category and library filters from header patron search not taken into account
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 32651 (view as bug list)
Depends on: 7380
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-07 12:55 UTC by Jonathan Druart
Modified: 2023-12-28 20:44 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04,22.05.11


Attachments
Bug 33155: Fix category and library filters in patron search header (1.84 KB, patch)
2023-03-07 12:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33155: Fix category and library filters in patron search header (1.89 KB, patch)
2023-03-07 13:11 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-03-07 12:55:14 UTC
Caused by 
  commit f1925cf89dbc1039fc48abfabad1472289387148
  Bug 7380: Rename filter to avoid confusion


     [% IF categorycode %]
-        $("#categorycode_filter").val("[% categorycode %]");
+        $("#categorycode_filter").val("[% categorycode_filter %]");
     [% END %]
     [% IF branchcode %]
-        $("#branchcode_filter").val("[% branchcode %]");
+        $("#branchcode_filter").val("[% branchcode_filter %]");
     [% END %]


Forgot to rename the vars in the IF statements
Comment 1 Jonathan Druart 2023-03-07 12:56:49 UTC
Created attachment 147834 [details] [review]
Bug 33155: Fix category and library filters in patron search header

Caused by
  commit f1925cf89dbc1039fc48abfabad1472289387148
  Bug 7380: Rename filter to avoid confusion

     [% IF categorycode %]
-        $("#categorycode_filter").val("[% categorycode %]");
+        $("#categorycode_filter").val("[% categorycode_filter %]");
     [% END %]
     [% IF branchcode %]
-        $("#branchcode_filter").val("[% branchcode %]");
+        $("#branchcode_filter").val("[% branchcode_filter %]");
     [% END %]

Forgot to rename the vars in the IF statements

Test plan:
Go to the Koha mainpage
Click "Search patrons" in the headers
Open the filters
Select something for library and category, search
=> The values must be picked for the patron search
Comment 2 Nick Clemens 2023-03-07 13:11:40 UTC
Created attachment 147836 [details] [review]
Bug 33155: Fix category and library filters in patron search header

Caused by
  commit f1925cf89dbc1039fc48abfabad1472289387148
  Bug 7380: Rename filter to avoid confusion

     [% IF categorycode %]
-        $("#categorycode_filter").val("[% categorycode %]");
+        $("#categorycode_filter").val("[% categorycode_filter %]");
     [% END %]
     [% IF branchcode %]
-        $("#branchcode_filter").val("[% branchcode %]");
+        $("#branchcode_filter").val("[% branchcode_filter %]");
     [% END %]

Forgot to rename the vars in the IF statements

Test plan:
Go to the Koha mainpage
Click "Search patrons" in the headers
Open the filters
Select something for library and category, search
=> The values must be picked for the patron search

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 3 Nick Clemens 2023-03-07 13:12:06 UTC
Trivial fix, PQA
Comment 4 Tomás Cohen Arazi 2023-03-07 18:33:24 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 5 Matt Blenkinsop 2023-03-08 14:43:59 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 6 Lucas Gass 2023-03-10 17:28:44 UTC
Backported to 22.05.x for upcoming 22.05.11
Comment 7 Katrin Fischer 2023-04-23 12:19:58 UTC
*** Bug 32651 has been marked as a duplicate of this bug. ***
Comment 8 wainuiwitikapark 2023-04-27 05:53:14 UTC
This is on 21.11

Not backported to 21.05.x