[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
Fri Oct 17 09:38:23 CEST 2014


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

M. de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #3 from M. de Rooy <m.de.rooy at rijksmuseum.nl> ---
QA Comment:
Fridolin, although our coding guidelines do not say anything about the use of
eval, I do not think that this is the most elegant solution. It also will
degrade performance btw.
The actual problem is somewhere else and I would prefer to solve it there.

In this case the corrupted record will be discovered by GetMarcBiblio (it also
contains an eval already btw!).
Note that GetMarcBiblio returns undef now, but this return value is NOT checked
by UpdateTotalIssues. So here we come closer.. 
UpdateTotalIssues should test that value and not just say $record->field..
(There will be [much] more instances where this happens.]

So, we could do at least two things now:
[1] Return from UpdateTotalIssues: return if !$record; the cronjob continues.
(Note that there is a warn in GetMarcBiblio.)
[2] Also return a value to the caller (note that only the cronjob and
Circulation.pm call this routine). Print the number of skipped records in the
cronjob.

Setting status to Failed QA

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


More information about the Koha-bugs mailing list