[Bug 30447] New: pendingreserves.pl is checking too many transfers
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Bug ID: 30447 Summary: pendingreserves.pl is checking too many transfers Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Bug 26057 added a 'cancellationdate' column to branchtransfers The code in pendingreserves.pl checks against transfers like: 'itembib.itemnumber' => { -not_in => \'SELECT itemnumber FROM branchtransfers WHERE datearrived IS NULL' } This needs to be updated to: 'itembib.itemnumber' => { -not_in => \'SELECT itemnumber FROM branchtransfers WHERE datearrived IS NULL AND datecancelled IS NULL' } -- 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=30447 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- 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=30447 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 132935 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132935&action=edit Bug 30447: Check if transfers arrived or cancelled TO test: 1 - Find a bib with a single item 2 - Browse to Circulation->Transfer 3 - Transfer the item to another branch 4 - Check the item in at current branch and cancel the transfer on the dialog 5 - Place a hold on the biblio for a patron at current branch 6 - Browse to Circulation->Holds to pull 7 - Item does not show 8 - Apply patch, restart all 9 - Browse to Circulation->Holds to pull 10 - Item shows -- 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=30447 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=30447 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132935|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 132941 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132941&action=edit Bug 30447: Check if transfers arrived or cancelled TO test: 1 - Find a bib with a single item 2 - Browse to Circulation->Transfer 3 - Transfer the item to another branch 4 - Check the item in at current branch and cancel the transfer on the dialog 5 - Place a hold on the biblio for a patron at current branch 6 - Browse to Circulation->Holds to pull 7 - Item does not show 8 - Apply patch, restart all 9 - Browse to Circulation->Holds to pull 10 - Item shows Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- 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=30447 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Status|Signed Off |Failed QA Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Can you provide a test please? -- 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=30447 Michal Urban <michalurban177@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132941|0 |1 is obsolete| | --- Comment #4 from Michal Urban <michalurban177@gmail.com> --- Created attachment 136184 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136184&action=edit Bug 30447: Check if transfers arrived or cancelled TO test: 1 - Find a bib with a single item 2 - Browse to Circulation->Transfer 3 - Transfer the item to another branch 4 - Check the item in at current branch and cancel the transfer on the dialog 5 - Place a hold on the biblio for a patron at current branch 6 - Browse to Circulation->Holds to pull 7 - Item does not show 8 - Apply patch, restart all 9 - Browse to Circulation->Holds to pull 10 - Item shows 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=30447 --- Comment #5 from Michal Urban <michalurban177@gmail.com> --- Created attachment 136185 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136185&action=edit Added test to ensure that Koha::Holds->get_items_that_can_fill returns items with datecancelled and datearrived -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Michal Urban <michalurban177@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136185|0 |1 is obsolete| | --- Comment #6 from Michal Urban <michalurban177@gmail.com> --- Created attachment 136186 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136186&action=edit Added test to ensure that Koha::Holds->get_items_that_can_fill returns items with datecancelled and datearrived -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 --- Comment #7 from Michal Urban <michalurban177@gmail.com> --- Created attachment 136187 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136187&action=edit Added test to ensure that Koha::Holds->get_items_that_can_fill returns items with either datecancelled or datearrived (inclusive). I made an error with my understanding of my boolean logic. Also cleaned up the variables in the test by removing unblessed and using the variable base forms. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 --- Comment #8 from Michal Urban <michalurban177@gmail.com> --- Created attachment 136198 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136198&action=edit Continued from previous patch: Added test for correct number of items for each call of "get_items_that_fill" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Michal Urban <michalurban177@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136184|0 |1 is obsolete| | --- Comment #9 from Michal Urban <michalurban177@gmail.com> --- Created attachment 136199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136199&action=edit Bug 30447: Check if transfers arrived or cancelled TO test: 1 - Find a bib with a single item 2 - Browse to Circulation->Transfer 3 - Transfer the item to another branch 4 - Check the item in at current branch and cancel the transfer on the dialog 5 - Place a hold on the biblio for a patron at current branch 6 - Browse to Circulation->Holds to pull 7 - Item does not show 8 - Apply patch, restart all 9 - Browse to Circulation->Holds to pull 10 - Item shows Test in Holds.t Added test to ensure that Koha::Holds->get_items_that_can_fill returns items with datecancelled and datearrived Also cleaned up the variables in the test by removing unblessed and using the variable base forms. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136186|0 |1 is obsolete| | Attachment #136187|0 |1 is obsolete| | Attachment #136198|0 |1 is obsolete| | Attachment #136199|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 136200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136200&action=edit Bug 30447: Check if transfers arrived or cancelled TO test: 1 - Find a bib with a single item 2 - Browse to Circulation->Transfer 3 - Transfer the item to another branch 4 - Check the item in at current branch and cancel the transfer on the dialog 5 - Place a hold on the biblio for a patron at current branch 6 - Browse to Circulation->Holds to pull 7 - Item does not show 8 - Apply patch, restart all 9 - Browse to Circulation->Holds to pull 10 - Item shows 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=30447 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 136201 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136201&action=edit Bug 30447: Unit tests Added tests to ensure that Koha::Holds->get_items_that_can_fill returns items with datecancelled and datearrived Added test for correct number of items for each call of "get_items_that_fill" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Shouldn't we want both using the same code (a filter_by method in Koha::Item::Transfers)? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #12)
Shouldn't we want both using the same code (a filter_by method in Koha::Item::Transfers)?
Yes, that would be a good goal. I will move that patch forward when you write it ;-) This one fixes the bug and backports nicely for now, can it move forward? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136200|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137704 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137704&action=edit Bug 30447: Check if transfers arrived or cancelled TO test: 1 - Find a bib with a single item 2 - Browse to Circulation->Transfer 3 - Transfer the item to another branch 4 - Check the item in at current branch and cancel the transfer on the dialog 5 - Place a hold on the biblio for a patron at current branch 6 - Browse to Circulation->Holds to pull 7 - Item does not show 8 - Apply patch, restart all 9 - Browse to Circulation->Holds to pull 10 - Item shows Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136201|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137705&action=edit Bug 30447: Unit tests Added tests to ensure that Koha::Holds->get_items_that_can_fill returns items with datecancelled and datearrived Added test for correct number of items for each call of "get_items_that_fill" Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good catch. I've still got a second phase of transfers cleanup I'll get back to some time soon and will make sure we add filter methods there so I don't think we need to hold back this simple to backport version. Works as expected and has tests. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31183 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31183 [Bug 31183] Add Koha::Item::Transfers->filter_by_current -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 --- Comment #17 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=30447 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.05 released in| | Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #18 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for 22.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.05 |22.11.00, 22.05.05, released in| |21.11.12 CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |Pushed to oldstable --- Comment #19 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- thx pushed to 21.11.x for 21.11.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #20 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30447 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31920 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31920 [Bug 31920] Unit test t/db_dependent/Holds.t leaves behind database cruft -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org