[Koha-bugs] [Bug 9231] Batch revert staged MARC records fails if one or more records in a batch have been deleted.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 9 14:34:43 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9231

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19350|0                           |1
        is obsolete|                            |

--- Comment #11 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 20219
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20219&action=edit
Bug 9231 - Batch revert staged MARC records fails if one or more records in a
batch have been deleted.

If a record in an imported batch is deleted, any attempt to revert the
batch will result in the progress bar never reaching 100%. The
background job dies when it hits the already deleted record, with the
error occurring in C4::Items::DelItem for the line:
$copy2deleted->execute( $record->as_usmarc(), $itemnumber );
which fails because $record is undefined.

To keep the failure from causing the script to die, we just need
to check the record to see if it loaded before working on it.

Test Plan:
1) Stage a batch of marc records
2) Import those records
3) Delete one of those records
4) Attempt to revert the batch, it will hang.
5) Apply this patch
6) Repeat steps 1-4, the revert should succeed.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list