Bug 18270

Summary: No need to fetch the MARC record when deleting an item
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, kyle, martin.renvoize, veron
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 18270: Do not fetch the MARC record when deleting an item
Bug 18270: Do not fetch the MARC record when deleting an item
Bug 18270: Do not fetch the MARC record when deleting an item

Description Jonathan Druart 2017-03-15 12:29:57 UTC
From C4::Items::DelItem

 683     # get the MARC record                                                                           
 684     my $record = GetMarcBiblio($biblionumber);                                                      
 685     ModZebra( $biblionumber, "specialUpdate", "biblioserver" );                                     
 686                                                                                                     
 687     #search item field code                                                                         
 688     logaction("CATALOGUING", "DELETE", $itemnumber, "item") if C4::Context->preference("CataloguingLog");
 689     return $deleted;                                                                                
 690 }   

The GetMarcBiblio call is not needed.
Comment 1 Jonathan Druart 2017-03-15 12:32:19 UTC
Created attachment 61100 [details] [review]
Bug 18270: Do not fetch the MARC record when deleting an item

$record is never used later, the call is superfluous.

Test plan:
Quick glance at the code should be enough
Comment 2 Marc Véron 2017-03-15 15:21:55 UTC
Created attachment 61103 [details] [review]
Bug 18270: Do not fetch the MARC record when deleting an item

$record is never used later, the call is superfluous.

Test plan:
Quick glance at the code should be enough

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 3 Martin Renvoize 2017-03-20 12:04:56 UTC
Created attachment 61286 [details] [review]
Bug 18270: Do not fetch the MARC record when deleting an item

$record is never used later, the call is superfluous.

Test plan:
Quick glance at the code should be enough

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Kyle M Hall 2017-03-31 10:49:07 UTC
Pushed to master for 17.05, thanks Jonathan!
Comment 5 Katrin Fischer 2017-04-02 16:15:06 UTC
Code enhancement.

This won't get ported back to 16.11.x as it is an enhancement.