Bug 33155

Summary: Category and library filters from header patron search not taken into account
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, koha, kyle.m.hall, lucas, nick, wainuiwitikapark
Version: unspecified   
Hardware: All   
OS: All   
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
Bug Depends on: 7380    
Bug Blocks:    
Attachments: Bug 33155: Fix category and library filters in patron search header
Bug 33155: Fix category and library filters in patron search header

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 (kidclamp) 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 (kidclamp) 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