Bug 21201 - C4::Items - Remove GetItemnumbersForBiblio
Summary: C4::Items - Remove GetItemnumbersForBiblio
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 21184
Blocks: 18252
  Show dependency treegraph
 
Reported: 2018-08-10 14:54 UTC by Jonathan Druart
Modified: 2019-10-14 19:58 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls (5.58 KB, patch)
2018-08-10 14:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21201: Remove GetItemnumbersForBiblio (1.33 KB, patch)
2018-08-10 14:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls (5.61 KB, patch)
2018-08-17 06:12 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 21201: Remove GetItemnumbersForBiblio (1.38 KB, patch)
2018-08-17 06:12 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls (5.70 KB, patch)
2018-08-24 08:29 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 21201: Remove GetItemnumbersForBiblio (1.47 KB, patch)
2018-08-24 08:29 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 14:54:32 UTC
my $itemnumbers = GetItemnumbersForBiblio($biblionumber);
will become
  my $itemnumbers = [ Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber") ];
Comment 1 Jonathan Druart 2018-08-10 14:59:50 UTC
Created attachment 77685 [details] [review]
Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls

Those calls to C4::Items::GetItemnumbersForBiblio can be replaced with
    my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber")

Test plan:
- Use the GetAvailability service of ILS-DI
- Try to place a hold on an item that is available and another one
- Use the batch record deletion tool to remove record with and without items.
Comment 2 Jonathan Druart 2018-08-10 14:59:54 UTC
Created attachment 77686 [details] [review]
Bug 21201: Remove GetItemnumbersForBiblio
Comment 3 Josef Moravec 2018-08-17 06:12:23 UTC
Created attachment 77964 [details] [review]
Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls

Those calls to C4::Items::GetItemnumbersForBiblio can be replaced with
    my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber")

Test plan:
- Use the GetAvailability service of ILS-DI
- Try to place a hold on an item that is available and another one
- Use the batch record deletion tool to remove record with and without items.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Josef Moravec 2018-08-17 06:12:27 UTC
Created attachment 77965 [details] [review]
Bug 21201: Remove GetItemnumbersForBiblio

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Marcel de Rooy 2018-08-24 08:29:46 UTC
Created attachment 78114 [details] [review]
Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls

Those calls to C4::Items::GetItemnumbersForBiblio can be replaced with
    my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber")

Test plan:
- Use the GetAvailability service of ILS-DI
- Try to place a hold on an item that is available and another one
- Use the batch record deletion tool to remove record with and without items.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2018-08-24 08:29:52 UTC
Created attachment 78115 [details] [review]
Bug 21201: Remove GetItemnumbersForBiblio

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Nick Clemens 2018-08-31 12:59:24 UTC
Awesome work all!

Pushed to master for 18.11
Comment 8 Martin Renvoize 2018-09-05 14:37:02 UTC
Enhancement, will not be backported to 18.05.x series.