Bug 8532 - Old/iffy data causes error checking out
Summary: Old/iffy data causes error checking out
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 3.8
Hardware: All All
: P3 normal (vote)
Assignee: Robin Sheat
QA Contact: Marcel de Rooy
URL:
Keywords:
: 8537 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-31 11:20 UTC by Robin Sheat
Modified: 2013-12-05 20:01 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8532 - improve robustness when converting dates (1.48 KB, patch)
2012-07-31 11:26 UTC, Robin Sheat
Details | Diff | Splinter Review
Bug 8532 - improve robustness when converting dates (1.63 KB, patch)
2012-08-01 14:23 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Sheat 2012-07-31 11:20:13 UTC
In some cases (I don't really know the cause, but it doesn't matter) the issuedate in the 'old_issues' table ends up with NULL. In the case, there is an error when converting that date to the proper form during circulation (possibly happens elsewhere too, but that's where I saw it.)
Comment 1 Robin Sheat 2012-07-31 11:26:39 UTC Comment hidden (obsolete)
Comment 2 Robin Sheat 2012-07-31 11:27:51 UTC
This should be put into 3.8 also.
Comment 3 Jonathan Druart 2012-08-01 14:23:12 UTC
Created attachment 11261 [details] [review]
Bug 8532 - improve robustness when converting dates

If undef is passed to the date format conversion function, it dies. This
can happen when you have old data in the database. Better to handle it
in some fashion rather than die, so now it just returns undef too.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I replace "return undef" with just "return" to pass perlcritic
Comment 4 Jonathan Druart 2012-08-06 12:37:35 UTC
*** Bug 8537 has been marked as a duplicate of this bug. ***
Comment 5 Chris Cormack 2012-08-06 20:42:38 UTC
Marcel if you could QA this, that would be fantastic!
Comment 6 Marcel de Rooy 2012-08-07 12:58:52 UTC
Tiny patch, handling passed undefs. Passed QA
Comment 7 Chris Cormack 2012-08-07 20:52:53 UTC
Pushed to 3.8.x, will be in 3.8.4
Comment 8 Paul Poulain 2012-08-31 15:31:23 UTC
pushed to master. Already on stable, changing status accordingly