Summary: | Duplicated code in search.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | aleisha, lucas, martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00, 20.05.03
|
|
Circulation function: | |||
Bug Depends on: | 12478 | ||
Bug Blocks: | |||
Attachments: |
Bug 26141: Remove duplicated code from search.pl
Bug 26141: Remove duplicated code from search.pl |
Description
Jonathan Druart
2020-08-05 07:57:52 UTC
Created attachment 107820 [details] [review] Bug 26141: Remove duplicated code from search.pl commit 417553a9e47bf31f4cb785162e3dced856a2ac2a Bug 12478: starting to add search to staff client This commit added code related to the itemtypes to the advanced search, but this code already existed. The weird bit is: $template->param(advancedsearchesloop => \@advancedsearchesloop); my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; my $advancedsearchesloop = prepare_adv_search_types($types); $template->param(advancedsearchesloop => $advancedsearchesloop); We are passing twice advancedsearchesloop to the template. Test plan (for QA): Review the changes and confirm that we can safely remove this code Created attachment 107828 [details] [review] Bug 26141: Remove duplicated code from search.pl commit 417553a9e47bf31f4cb785162e3dced856a2ac2a Bug 12478: starting to add search to staff client This commit added code related to the itemtypes to the advanced search, but this code already existed. The weird bit is: $template->param(advancedsearchesloop => \@advancedsearchesloop); my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; my $advancedsearchesloop = prepare_adv_search_types($types); $template->param(advancedsearchesloop => $advancedsearchesloop); We are passing twice advancedsearchesloop to the template. Test plan (for QA): Review the changes and confirm that we can safely remove this code Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Another one for a straight QA.. I've compared the code and it is indeed a direct clone of the factored out routine directly below it (with a few variables renamed.. moreover the template variable is actually be overwritten by the second call to set it via the factored out return anyway. Safe to remove, Passing QA Pushed to master for 20.11, thanks to everybody involved! backported to 20.05.x for 20.05.03 enhancement, not backported to 19.11.x |