Steps to reproduce: - Run the provided regression tests
Created attachment 113626 [details] [review] Bug 27021: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 113627 [details] [review] 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>
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
Created attachment 113636 [details] [review] Bug 27021: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 113637 [details] [review] 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>
Created attachment 113638 [details] [review] 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>
Created attachment 113639 [details] [review] 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>
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
Pushed to master for 20.11, thanks to everybody involved!
Pushed to 20.05 for 20.05.07
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.