Bug 21205 - C4::Acquisition - Remove GetOrderFromItemnumber
Summary: C4::Acquisition - Remove GetOrderFromItemnumber
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on: 15184 21202
Blocks: 21204 21206 22360
  Show dependency treegraph
 
Reported: 2018-08-10 15:26 UTC by Jonathan Druart
Modified: 2019-02-21 18:27 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls (17.06 KB, patch)
2018-08-10 16:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls (17.07 KB, patch)
2018-08-21 13:17 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 21205: (follow-up) Fix column name - itemnumbers -> itemnumber (2.15 KB, patch)
2018-08-21 13:17 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls (17.16 KB, patch)
2018-08-31 05:46 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 21205: (follow-up) Fix column name - itemnumbers -> itemnumber (2.25 KB, patch)
2018-08-31 05:46 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2018-08-10 15:26:40 UTC
This is done to ease the move of C4::Items (bug 18252) to Koha::Items

  my @itemnumbers = GetItemnumbersFromOrder($order->{ordernumber});
will become
  my @itemnumbers = $order_object->items->get_column('itemnumbers');
Comment 1 Jonathan Druart 2018-08-10 15:59:35 UTC
Koha::Acquisition::Order->items comes from bug 15184
Comment 2 Jonathan Druart 2018-08-10 16:01:27 UTC
Created attachment 77698 [details] [review]
Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls

This is done to ease the move of C4::Items (bug 18252) to Koha::Items

  my @itemnumbers = GetItemnumbersFromOrder($order->{ordernumber});
will become
  my @itemnumbers = $order_object->items->get_column('itemnumbers');

Test plan:
- Create an order with several items
- Receive some items
Comment 3 Josef Moravec 2018-08-21 13:17:20 UTC
Created attachment 78042 [details] [review]
Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls

This is done to ease the move of C4::Items (bug 18252) to Koha::Items

  my @itemnumbers = GetItemnumbersFromOrder($order->{ordernumber});
will become
  my @itemnumbers = $order_object->items->get_column('itemnumbers');

Test plan:
- Create an order with several items
- Receive some items

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Josef Moravec 2018-08-21 13:17:23 UTC
Created attachment 78043 [details] [review]
Bug 21205: (follow-up) Fix column name - itemnumbers -> itemnumber

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Marcel de Rooy 2018-08-24 08:37:54 UTC
perl t/db_dependent/Acquisition/CancelReceipt.t
1..12
The method Koha::Acquisition::Order->items is not covered by tests!

 perl t/db_dependent/Acquisition/TransferOrder.t
1..13
ok 1 - 1 order in basket1
The method Koha::Acquisition::Order->items is not covered by tests!
Comment 6 Jonathan Druart 2018-08-24 20:06:47 UTC
Koha::Acquisition::Order->items is added by bug 15184
Comment 7 Marcel de Rooy 2018-08-31 05:26:08 UTC
QA: Looking here
Comment 8 Marcel de Rooy 2018-08-31 05:46:27 UTC
Created attachment 78319 [details] [review]
Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls

This is done to ease the move of C4::Items (bug 18252) to Koha::Items

  my @itemnumbers = GetItemnumbersFromOrder($order->{ordernumber});
will become
  my @itemnumbers = $order_object->items->get_column('itemnumbers');

Test plan:
- Create an order with several items
- Receive some items

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2018-08-31 05:46:32 UTC
Created attachment 78320 [details] [review]
Bug 21205: (follow-up) Fix column name - itemnumbers -> itemnumber

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2018-08-31 05:47:53 UTC
Passed QA but note that 15184 is in FQA now. Please wait, RM. Added a temporary flag in the title.
Comment 11 Nick Clemens 2018-11-08 21:10:22 UTC
Awesome work all!

Pushed to master for 18.11
Comment 12 Martin Renvoize 2018-11-16 14:01:04 UTC
Enhancement, will not be backported to 18.05.x series.