[Bug 17556] New: Move GetHideLostItemsPreference to Koha::Patron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Bug ID: 17556 Summary: Move GetHideLostItemsPreference to Koha::Patron Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 17555 Blocks: 16846 The subroutine C4::Members::GetHideLostItemsPreference can easily be replaced with Koha::Patron->find(42)->category->hidelostitems Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16846 [Bug 16846] Move patron related code to Koha::Patron https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17555 [Bug 17555] Add Koha::Patron->category -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=17556 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 57215 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57215&action=edit Bug 17556: Koha::Patrons - Remove GetHideLostItemsPreference The subroutine C4::Members::GetHideLostItemsPreference can easily be replaced with Koha::Patron->find(42)->category->hidelostitems Test plan: Create 2 patron categories, 1 with "Lost items in staff client" set to "shown" and another one to "Hidden by default" Create 2 patrons using them On the result search page, the detail page of a record, the item list page and the page to place a hold, make sure the lost items are shown/hidden as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #2 from Josef Moravec <josef.moravec@gmail.com> --- In reserve request, if I tried to hold through "Search to hold" functionality, everything works OK, but when I tried just "hold" link (on search result page and detail) i get "Can't call method "category" on an undefined value at /home/vagrant/kohaclone/reserve/request.pl line 417." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57215|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 57246 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57246&action=edit Bug 17556: Koha::Patrons - Remove GetHideLostItemsPreference The subroutine C4::Members::GetHideLostItemsPreference can easily be replaced with Koha::Patron->find(42)->category->hidelostitems Test plan: Create 2 patron categories, 1 with "Lost items in staff client" set to "shown" and another one to "Hidden by default" Create 2 patrons using them On the result search page, the detail page of a record, the item list page and the page to place a hold, make sure the lost items are shown/hidden as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Josef Moravec from comment #2)
In reserve request, if I tried to hold through "Search to hold" functionality, everything works OK, but when I tried just "hold" link (on search result page and detail) i get "Can't call method "category" on an undefined value at /home/vagrant/kohaclone/reserve/request.pl line 417."
Sorry about that, last patch should fix that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57246|0 |1 is obsolete| | --- Comment #5 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 57361 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57361&action=edit [SIGNED-OFF] Bug 17556: Koha::Patrons - Remove GetHideLostItemsPreference The subroutine C4::Members::GetHideLostItemsPreference can easily be replaced with Koha::Patron->find(42)->category->hidelostitems Test plan: Create 2 patron categories, 1 with "Lost items in staff client" set to "shown" and another one to "Hidden by default" Create 2 patrons using them On the result search page, the detail page of a record, the item list page and the page to place a hold, make sure the lost items are shown/hidden as expected Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Bug 17556 depends on bug 17555, which changed state. Bug 17555 Summary: Add Koha::Patron->category https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17555 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please add a test :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #6)
Please add a test :)
I'd like you to reconsider this, the searchResults massive subroutine is not tested and it would be very time consuming to cover this change. Basically the change is: - SELECT hidelostitems FROM borrowers,categories WHERE borrowers.categorycode = categories.categorycode AND borrowernumber = ? + Koha::Patrons->find($borrowernumber)->category->hidelostitems Which sounds quite safe :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57361|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 57922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57922&action=edit Bug 17556: Koha::Patrons - Remove GetHideLostItemsPreference The subroutine C4::Members::GetHideLostItemsPreference can easily be replaced with Koha::Patron->find(42)->category->hidelostitems Test plan: Create 2 patron categories, 1 with "Lost items in staff client" set to "shown" and another one to "Hidden by default" Create 2 patrons using them On the result search page, the detail page of a record, the item list page and the page to place a hold, make sure the lost items are shown/hidden as expected Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I think that there is still room for improvement in the combination of the preference hidelostitems and the category column. This could be moved from the scripts into the object. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #11 from Liz Rea <liz@catalyst.net.nz> --- Not that it particularly matters, because you shouldn't do this anyway - this patch breaks searching in the staff client for the database user superlibrarian. Only leaving this note in case someone else sees Can't call method "category" on an undefined value at /home/liz/koha-src/koha/C4/Search.pm line 2091. and traces it back to this patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED CC| |katrin.fischer@bsz-bw.de --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This won't get backported to 16.11.x as it is an enhancement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17764 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17764 [Bug 17764] OPAC search fails when lost items are in the result set and there is no logged in user -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 George Veranis <gveranis@seab.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gveranis@seab.gr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17556 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19870 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org