[Bug 27021] New: Chaining on Koha::Objects->empty should always return an empty resultset
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27021 Bug ID: 27021 Summary: Chaining on Koha::Objects->empty should always return an empty resultset Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Steps to reproduce: - Run the provided regression tests -- 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=27021 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |kyle@bywatersolutions.com, | |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=27021 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 113626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113626&action=edit Bug 27021: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- 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=27021 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.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=27021 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 113627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113627&action=edit Bug 27021: Make chaining ->empty always return an empty resultset This patch borrows the implementation Martin did on bug 27002, to woraround this issue, and implements it properly on the Koha::Objects->empty method. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Objects.t => FAIL: Tests fail! The resultset should be empty and it isn't! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off! 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=27021 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Blocks| |27002 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27002 [Bug 27002] Make Koha::Biblio->pickup_locations return a Koha::Libraries resultset -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27021 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- The only place in the code were we used ->empty is in Koha::Acquisition::Order->current_item_level_holds so worth checking this as well: $ kshell k$ prove t/db_dependent/Koha/Acquisition/Order.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27021 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113626|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 113636 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113636&action=edit Bug 27021: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27021 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113627|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 113637 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113637&action=edit Bug 27021: Make chaining ->empty always return an empty resultset This patch borrows the implementation Martin did on bug 27002, to woraround this issue, and implements it properly on the Koha::Objects->empty method. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Objects.t => FAIL: Tests fail! The resultset should be empty and it isn't! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27021 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com 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=27021 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113636|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113638 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113638&action=edit Bug 27021: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> 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=27021 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113637|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113639&action=edit Bug 27021: Make chaining ->empty always return an empty resultset This patch borrows the implementation Martin did on bug 27002, to woraround this issue, and implements it properly on the Koha::Objects->empty method. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Objects.t => FAIL: Tests fail! The resultset should be empty and it isn't! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> 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=27021 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=27021 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I approve of moving the 'always empty search' code into this method, it's much cleaner long term. Works as expected and no regressions found. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27021 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.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=27021 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27021 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.07 released in| | Status|Pushed to master |Pushed to stable CC| |andrew@bywatersolutions.com --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05 for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27021 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27021 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #11 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org