Bug 21201

Summary: C4::Items - Remove GetItemnumbersForBiblio
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy, martin.renvoize, nick
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 21184    
Bug Blocks: 18252    
Attachments: Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls
Bug 21201: Remove GetItemnumbersForBiblio
Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls
Bug 21201: Remove GetItemnumbersForBiblio
Bug 21201: Replace C4::Items::GetItemnumbersForBiblio calls
Bug 21201: Remove GetItemnumbersForBiblio

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 (kidclamp) 2018-08-31 12:59:24 UTC
Awesome work all!

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