Created attachment 129856 [details] [review] Bug 29955: Move populate_order_with_prices to Koha namespace and split the subroutine into 2 smaller subroutines (one for ordering, the other for receiving) Test plan: 1. Create a vendor and an acquisition basket 2. In this basket, create new orders using all the different methods (from an existing record, from a suggestion, from a new record, ...) then close the basket and receive these orders. Make sure it works the same with and without the patch 3. Run tests in t/Prices.t, t/db_dependent/Acquisition/populate_order_with_prices.t, and t/db_dependent/Budgets.t
Created attachment 135436 [details] [review] Bug 29955: Move populate_order_with_prices to Koha namespace and split the subroutine into 2 smaller subroutines (one for ordering, the other for receiving) Test plan: 1. Create a vendor and an acquisition basket 2. In this basket, create new orders using all the different methods (from an existing record, from a suggestion, from a new record, ...) then close the basket and receive these orders. Make sure it works the same with and without the patch 3. Run tests in t/Prices.t, t/db_dependent/Acquisition/populate_order_with_prices.t, and t/db_dependent/Budgets.t Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Created attachment 137797 [details] [review] Bug 29955: Move populate_order_with_prices to Koha namespace and split the subroutine into 2 smaller subroutines (one for ordering, the other for receiving) Test plan: 1. Create a vendor and an acquisition basket 2. In this basket, create new orders using all the different methods (from an existing record, from a suggestion, from a new record, ...) then close the basket and receive these orders. Make sure it works the same with and without the patch 3. Run tests in t/Prices.t, t/db_dependent/Acquisition/populate_order_with_prices.t, and t/db_dependent/Budgets.t Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Rebased
Created attachment 139487 [details] [review] Bug 29955: Move populate_order_with_prices to Koha namespace and split the subroutine into 2 smaller subroutines (one for ordering, the other for receiving) Test plan: 1. Create a vendor and an acquisition basket 2. In this basket, create new orders using all the different methods (from an existing record, from a suggestion, from a new record, ...) then close the basket and receive these orders. Make sure it works the same with and without the patch 3. Run tests in t/Prices.t, t/db_dependent/Acquisition/populate_order_with_prices.t, and t/db_dependent/Budgets.t Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
*** Bug 30875 has been marked as a duplicate of this bug. ***
Created attachment 139518 [details] [review] Bug 29955: (QA follow-up) Tidy code block Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 22.11. Nice work everyone, thanks!
Created attachment 139613 [details] [review] Bug 29955: Fix method import issues This patch fixes this: $ prove t/db_dependent/Utils/Datatables_Virtualshelves.t t/db_dependent/Utils/Datatables_Virtualshelves.t .. 2/13 Use of inherited AUTOLOAD for non-method Koha::Virtualshelf::haspermission() is no longer allowed at /kohadevbox/koha/Koha/Virtualshelf.pm line 248. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I suppose this is an enhancement? I will not backport to 22.05.x unless requested.
The last patch "import issue" fixes a crash in 22.05.06 (at least). I haven't managed to apply the whole set on Koha/VirtualShelf.pm, because of Bug 30933. It's a rabbit hole, but without it we get a 500 on public lists when logged in the OPAC.
(In reply to Blou from comment #11) > The last patch "import issue" fixes a crash in 22.05.06 (at least). > > I haven't managed to apply the whole set on Koha/VirtualShelf.pm, because of > Bug 30933. It's a rabbit hole, but without it we get a 500 on public lists > when logged in the OPAC. See also bug 32080.
applied to 21.11 for 21.11.14 (backported from 22.05, lucas probably just forgot to update the bz)
To clarify, this was backported for 22.05.x and will be in the upcoming 22.05.07 release
(In reply to Lucas Gass from comment #15) > To clarify, this was backported for 22.05.x and will be in the upcoming > 22.05.07 release It looks like only the last patch was picked? That should be okay, just verifiying
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved.
Hum, is this really working? It feels like there is a store call missing on $order_obj.
(In reply to Jonathan Druart from comment #18) > Hum, is this really working? It feels like there is a store call missing on > $order_obj. This was for finishreceive. I think it's actually ok, the store is done in ModReceiveOrder.