[Bug 23912] New: Remove unused variable from C4::Search::getRecords
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Bug ID: 23912 Summary: Remove unused variable from C4::Search::getRecords Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: lari.taskula@hypernova.fi QA Contact: testopia@bugs.koha-community.org Remove unused variable $opac from C4/Search.pm getRecords subroutine. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lari.taskula@hypernova.fi |ity.org | Status|NEW |ASSIGNED --- Comment #1 from Lari Taskula <lari.taskula@hypernova.fi> --- It appears Bug 17248 made C4::Search::getRecords() parameter $opac unused and causes location and collection facets to prefer OPAC description over intranet one in all interfaces, including intranet itself. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Remove unused variable from |Get correct authorised |C4::Search::getRecords |values for location and | |collections facets --- Comment #2 from Lari Taskula <lari.taskula@hypernova.fi> --- (In reply to Lari Taskula from comment #1) Renamed bug title to match issue described in comment #1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17248 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17248 [Bug 17248] Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 --- Comment #3 from Lari Taskula <lari.taskula@hypernova.fi> --- Created attachment 94812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94812&action=edit Bug 23912: Get correct authorised value description for location and ccode facets in intranet Bug 17248 made C4::Search::getRecords() parameter $opac unused and causes location and collection facets to prefer OPAC description over intranet one in all interfaces, including intranet itself. This patch restores the functionality provided by $opac parameter. To reproduce: 1. Go to /cgi-bin/koha/admin/authorised_values.pl?searchfield=LOC and change both Description and Description (OPAC) of one row to be different 2. Do the same for /cgi-bin/koha/admin/authorised_values.pl?searchfield=CCODE 3. In intranet, search a record and make sure you are able to see facets after performing the search (your search must return multiple records) 4. Add/edit an item of one of these biblios on your results screen 5. Give this item the location and collection code that you changed in steps 1&2 6. In intranet, perform the same search from step 3 again 7. Observe your location and collections facets show Description (OPAC) value from step 1 and 2 instead of Description. To test: 1. Apply patch 2. Try to reproduce the bug again in intranet 3. Observe you will now see Description value instead of Description (OPAC) 4. prove t/db_dependent/Search.t Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 --- Comment #4 from Lari Taskula <lari.taskula@hypernova.fi> --- Created attachment 94813 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94813&action=edit Bug 23912: Use C4::Context->interface instead of passing $opac Since most of Koha's codebase using getRecords() is not passing $opac into the subroutine (the only exception being opac-search.pl and search.pl), remove parameter $opac from list of subroutine parameters and replace the functionality with C4::Context->interface. To test: 1. See test plan of the previous patch Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Architecture, internals, |Searching - Zebra |and plumbing | QA Contact|testopia@bugs.koha-communit | |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Depends on| |18322 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Change for LOC is a regression from bug 17248 (>= 16.11). CCODE is coming from bug 18322 (>= 18.11). Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18322 [Bug 18322] Add facets for ccode to zebra -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Lari Taskula from comment #4)
Created attachment 94813 [details] [review] Bug 23912: Use C4::Context->interface instead of passing $opac
Also, maybe we should move this one to its own bug report (more a code improvement than a bug fix). It seems that we could (should?) replace the first parameter of searchResults at the same time ( { interface => 'opac' } ) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26323 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #7 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- I think it needs review to use code like in Bug 26323. And also : Why is there in C4::Search::getRecords my $av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $one_facet }); When the description is fetched in template : [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => facet.facet_label_value, opac =>1 ) || facet.facet_label_value %][% END %] Shouldn't we better add code for location facet that is like for ccode ? And remove AV manipulation from C4::Search. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- up -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|lari.taskula@hypernova.fi |koha-bugs@lists.koha-commun | |ity.org --- Comment #9 from Lari Taskula <lari.taskula@hypernova.fi> --- (In reply to Fridolin Somers from comment #8)
up
Thanks! I'm currently not able to contribute to this Bug and probably will not be in the near future, so feel free to take over this Bug. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |ASSIGNED Severity|enhancement |normal Keywords| |regression --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I'll reclassify as bug, as we should show the intranet descriptons in the intranet and the OPAC descriptions in the OPAC. OPAC description in intranet is a bug and also sounds like a regression (comment#1 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23912 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org