[Bug 17729] New: Move IsItemOnHoldAndFound to Koha::Holds
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Bug ID: 17729 Summary: Move IsItemOnHoldAndFound to Koha::Holds 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17728 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17728 [Bug 17728] Move C4::Reserves code to the Koha namespace -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 57998 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57998&action=edit Bug 17729: Move IsItemOnHoldAndFound to Koha::Holds I don't think this is ready yet, since we are in loops, that can introduce speed improvement regressions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17736 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17736 [Bug 17736] Move GetReservesFromBiblionumber to Koha::Biblio->get_holds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|17736 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17736 [Bug 17736] Move GetReservesFromBiblionumber to Koha::Biblio->holds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Jonathan Druart <jonathan.druart@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=17729 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57998|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 171053 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171053&action=edit Bug 17729: Replace IsItemOnHoldAndFound This subroutine can easily be replaced with $item->holds->filter_by_found->count \o/ Test plan: Confirm that the old sub and $item->holds->filter_by_found->count produce the same query -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Move IsItemOnHoldAndFound |Replace |to Koha::Holds |IsItemOnHoldAndFound with | |$item->holds->filter_by_fou | |nd->count -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de --- Comment #3 from Paul Derscheid <paul.derscheid@lmscloud.de> --- It's not 100% identical, the question is whether that matters? The new version only tests for values considered 'found': 'P', 'T' and 'W'. The old version tests for everything that's not undef. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Paul Derscheid from comment #3)
It's not 100% identical, the question is whether that matters?
The new version only tests for values considered 'found': 'P', 'T' and 'W'.
The old version tests for everything that's not undef.
There is 'F' (for Finished). I have no idea, Nick maybe? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Paul Derscheid <paul.derscheid@lmscloud.de> 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=17729 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171053|0 |1 is obsolete| | --- Comment #5 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 171061 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171061&action=edit Bug 17729: Replace IsItemOnHoldAndFound This subroutine can easily be replaced with $item->holds->filter_by_found->count \o/ Test plan: Confirm that the old sub and $item->holds->filter_by_found->count produce the same query Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- It seems that "F" is set right before the hold is moved to "old" Koha/Hold.pm 821 sub fill { 827 $self->set( 828 { 829 found => 'F', 830 priority => 0, 831 $params->{item_id} ? ( itemnumber => $params->{item_id} ) : (), 832 } 833 ); 834 835 my $old_me = $self->_move_to_old; and $item->holds only return current holds. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 --- Comment #7 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- (In reply to Paul Derscheid from comment #3)
It's not 100% identical, the question is whether that matters?
The new version only tests for values considered 'found': 'P', 'T' and 'W'.
The old version tests for everything that's not undef
Spot checking a few production DB's I only see T,W,P, and NULL in that column We don't define any other statuses, so I think not including an unexpected value as found is okay - we could alter that subroutine if we think we need to check other values -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Nick Clemens (kidclamp) <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=17729 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171061|0 |1 is obsolete| | --- Comment #8 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 171065 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171065&action=edit Bug 17729: Replace IsItemOnHoldAndFound This subroutine can easily be replaced with $item->holds->filter_by_found->count \o/ Test plan: Confirm that the old sub and $item->holds->filter_by_found->count produce the same query Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Nick Clemens (kidclamp) from comment #7)
(In reply to Paul Derscheid from comment #3)
It's not 100% identical, the question is whether that matters?
The new version only tests for values considered 'found': 'P', 'T' and 'W'.
The old version tests for everything that's not undef
Spot checking a few production DB's I only see T,W,P, and NULL in that column
The 'F' status stands for 'filled', and can only be present in 'oldreserves'. Look at Koha/Hold.pm:848 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171065|0 |1 is obsolete| | --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 171069 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171069&action=edit Bug 17729: Replace IsItemOnHoldAndFound This subroutine can easily be replaced with $item->holds->filter_by_found->count \o/ Test plan: Confirm that the old sub and $item->holds->filter_by_found->count produce the same query Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Tomás Cohen Arazi <tomascohen@gmail.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=17729 --- Comment #11 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #9)
(In reply to Nick Clemens (kidclamp) from comment #7)
(In reply to Paul Derscheid from comment #3)
It's not 100% identical, the question is whether that matters?
The new version only tests for values considered 'found': 'P', 'T' and 'W'.
The old version tests for everything that's not undef
Spot checking a few production DB's I only see T,W,P, and NULL in that column
The 'F' status stands for 'filled', and can only be present in 'oldreserves'.
Or Finished, depending on where you look at: C4/Reserves.pm 72 F(inished) : the reserve has been completed, and is done 789 return 'Finished' if $found eq 'F'; Yes, means the same but... :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 --- Comment #12 from Jonathan Druart <jonathan.druart@gmail.com> --- Almost 8 years to get back to it and got SO+QA in 2 hours, thanks <3 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #12)
Almost 8 years to get back to it and got SO+QA in 2 hours, thanks <3
I would call it 'love'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17729 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Resolution|--- |FIXED Status|Pushed to main |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org