[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
Thu May 2 20:34:42 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 #14186|0                           |1
        is obsolete|                            |

--- Comment #4 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 17910
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17910&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 dleted, 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 eval it. Then, even if it fails, the batch revert will keep
going.

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