[Bug 31306] New: Add Koha::Items->search_ordered method
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Bug ID: 31306 Summary: Add Koha::Items->search_ordered method 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+koha@gmail.com Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org On bug 27272 we are going to replace C4::Items::GetItemsInfo with Koha::Items methods, but we need to keep the existing behaviour that is: Order by publisheddate, enumchron for searisl, or by homebranch.branchname, enumchron, LPAD( copynumber, 8, '0' ), desc dateaccessioned -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> 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=31306 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 138806 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138806&action=edit Bug 31306: Add search_ordered sub to order items with extra conditions Commit message from JD: On bug 27272 we are going to replace C4::Items::GetItemsInfo with Koha::Items methods, but we need to keep the existing behaviour that is: Order by publisheddate, enumchron for searisl, or by homebranch.branchname, enumchron, LPAD( copynumber, 8, '0' ), desc dateaccessioned Test plan: Confirm that the code from the new method makes sense Run t/db_dependent/Koha/Items.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 138807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138807&action=edit Bug 31306: Allow to pass params and attributes to search_ordered -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 138808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138808&action=edit Bug 31306: Add tests for search_ordered -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31308 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31308 [Bug 31308] Remove GetItemsInfo from basket/basket -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31309 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31309 [Bug 31309] Remove GetItemsInfo from basket/sendbasket -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31310 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31310 [Bug 31310] Remove GetItemsInfo from catalogue/imageviewer -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31311 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31311 [Bug 31311] Remove GetItemsInfo from labels/label-item-search -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31312 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31312 [Bug 31312] Remove GetItemsInfo from misc/migration_tools/rebuild_zebra.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31313 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31313 [Bug 31313] Remove GetItemsInfo from opac-detail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31314 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31314 [Bug 31314] Remove GetItemsInfo from opac-reserve.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31315 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31315 [Bug 31315] Remove GetItemsInfo from moredetail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31316 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31316 [Bug 31316] Remove GetItemsInfo from opac-sendbasket -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31317 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31317 [Bug 31317] Remove GetItemsInfo from opac-tags -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31318 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31318 [Bug 31318] Remove GetItemsInfo from serials/routing-preview -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31319 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31319 [Bug 31319] Remove GetItemsInfo from tags/list.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31320 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31320 [Bug 31320] Remove GetItemsInfo from virtualshelves/sendshelf.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31321 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31321 [Bug 31321] Remove GetItemsInfo from catalogue/detail.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=31306 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138806|0 |1 is obsolete| | Attachment #138807|0 |1 is obsolete| | Attachment #138808|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 138838 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138838&action=edit Bug 31306: Add search_ordered sub to order items with extra conditions Commit message from JD: On bug 27272 we are going to replace C4::Items::GetItemsInfo with Koha::Items methods, but we need to keep the existing behaviour that is: Order by publisheddate, enumchron for searisl, or by homebranch.branchname, enumchron, LPAD( copynumber, 8, '0' ), desc dateaccessioned Test plan: Confirm that the code from the new method makes sense Run t/db_dependent/Koha/Items.t Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 138839 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138839&action=edit Bug 31306: Allow to pass params and attributes to search_ordered Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 138840 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138840&action=edit Bug 31306: Add tests for search_ordered Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- You are deciding which way to sort based on: $self->search({ select => ["enumchron IS NOT NULL"] The original routine based it upon: $serial Which was a join between items->serialitems->serial I do not believe testing for enumchron is the same result - many libraries use the enumchron for other purposes. Probably a count of serial items would suffice? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Nick, have a look at the squashed version :) There is a (unadvertised) change that does what I think is correct in the second patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138838|0 |1 is obsolete| | Attachment #138839|0 |1 is obsolete| | Attachment #138840|0 |1 is obsolete| | --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 138905 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138905&action=edit Bug 31306: Add search_ordered sub to order items with extra conditions Commit message from JD: On bug 27272 we are going to replace C4::Items::GetItemsInfo with Koha::Items methods, but we need to keep the existing behaviour that is: Order by publisheddate, enumchron for searisl, or by homebranch.branchname, enumchron, LPAD( copynumber, 8, '0' ), desc dateaccessioned Test plan: Confirm that the code from the new method makes sense Run t/db_dependent/Koha/Items.t Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 138906 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138906&action=edit Bug 31306: Allow to pass params and attributes to search_ordered Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 138907 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138907&action=edit Bug 31306: Add tests for search_ordered Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 138908 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138908&action=edit Bug 31306: (QA follow-up) Add comments to test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to master |RESOLVED Resolution|--- |FIXED --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 22.05.x series -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32674 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32674 [Bug 32674] When placing a hold in OPAC page explodes into error 500 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31306 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36317 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36317 [Bug 36317] Koha::Biblio->host_items fails with search_ordered() -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org