it calls $self->SUPER::to_api but misses to pass the parameers. This makes embedding related objects fail to work.
Created attachment 97586 [details] [review] Bug 24457: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 97587 [details] [review] Bug 24457: Make overloaded ->to_api pass the params to parent method This patch makes the overloaded to_api method for baskets care about the remaining parameters, and pass them to SUPER::to_api. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/Koha/Acquisition/Basket.t => FAIL: Tests fail! No embedded bookseller! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 97588 [details] [review] Bug 24457: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 97589 [details] [review] Bug 24457: Make overloaded ->to_api pass the params to parent method This patch makes the overloaded to_api method for baskets care about the remaining parameters, and pass them to SUPER::to_api. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/Koha/Acquisition/Basket.t => FAIL: Tests fail! No embedded bookseller! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
What about Koha/Acquisition/Invoice.pm and Koha/Patron.pm?
(In reply to Jonathan Druart from comment #5) > What about Koha/Acquisition/Invoice.pm and Koha/Patron.pm? On bug 24459 I guess...
Created attachment 97672 [details] [review] Bug 24457: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 97673 [details] [review] Bug 24457: Make overloaded ->to_api pass the params to parent method This patch makes the overloaded to_api method for baskets care about the remaining parameters, and pass them to SUPER::to_api. To test: 1. Apply the regression tests 2. Run: $ kshell k$ prove t/db_dependent/Koha/Acquisition/Basket.t => FAIL: Tests fail! No embedded bookseller! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nice work everyone! Pushed to master for 20.05
Missing dependencies in 19.11.x not backported.