Bug 29955

Summary: Move C4::Acquisition::populate_order_with_prices to Koha::Acquisition::Order
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: Architecture, internals, and plumbingAssignee: Julian Maurice <julian.maurice>
Status: Pushed to master --- QA Contact: Nick Clemens <nick>
Severity: enhancement    
Priority: P5 - low CC: joonas.kylmala, nick, tomascohen, victor
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Bug Depends on:    
Bug Blocks: 15348, 21204, 29959    
Attachments: Bug 29955: Move populate_order_with_prices to Koha namespace
Bug 29955: Move populate_order_with_prices to Koha namespace
Bug 29955: Move populate_order_with_prices to Koha namespace
Bug 29955: Move populate_order_with_prices to Koha namespace
Bug 29955: (QA follow-up) Tidy code block
Bug 29955: Fix method import issues

Description Julian Maurice 2022-01-27 10:10:44 UTC

    
Comment 1 Julian Maurice 2022-01-27 10:11:39 UTC
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
Comment 2 Joonas Kylmälä 2022-05-28 10:27:03 UTC
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>
Comment 3 Victor Grousset/tuxayo 2022-07-16 22:06:58 UTC
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>
Comment 4 Victor Grousset/tuxayo 2022-07-16 22:07:16 UTC
Rebased
Comment 5 Nick Clemens 2022-08-19 12:23:15 UTC
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>
Comment 6 Tomás Cohen Arazi 2022-08-19 18:47:16 UTC
*** Bug 30875 has been marked as a duplicate of this bug. ***
Comment 7 Tomás Cohen Arazi 2022-08-19 18:51:49 UTC
Created attachment 139518 [details] [review]
Bug 29955: (QA follow-up) Tidy code block

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Tomás Cohen Arazi 2022-08-19 19:04:59 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 9 Tomás Cohen Arazi 2022-08-22 16:14:45 UTC
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>