[Koha-bugs] [Bug 12995] script update_totalissues.pl stops on corrupted record

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 23 17:41:44 CEST 2014


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

Owen Leonard <oleonard at myacpl.org> changed:

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

--- Comment #9 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 32629
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32629&action=edit
[SIGNED-OFF] Bug 12995 - script update_totalissues.pl stops on corrupted record

When running update_totalissues.pl cronjob, it will stop on a corrupted
record.

This patch changes UpdateTotalIssues so that it return 1 if processing
record has succeded. Also, if mapping with biblioitems.totalissues does
not exist, the method has nothing to do so it stops and returns 1.

When processing a corrupted record, script now alerts about the error on
this biblionumber (if script is verbose) and process next record.
A total number of records with error will be printed at the end of the
script.

Test plan :
- Create a dabase with a few biblios and some issues
- Modify first biblio record (use direct sql update) : set empty value
  in biblioitems.marcxml
- Launch script : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000
-v

=> Without patch : the script stops at first record
=> With patch : the script prints error for first record and processes
   all records

Signed-off-by: Owen Leonard <oleonard at myacpl.org>
I was able to confirm the problem before the patch and successfully
follow the test plan.

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


More information about the Koha-bugs mailing list