]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1418772: Avoid internal server error on viewing full record when copy create_date...
authorSteven Chan <schan@sitka.bclibraries.ca>
Mon, 22 Jul 2013 19:39:48 +0000 (12:39 -0700)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 19 Feb 2015 16:06:58 +0000 (16:06 +0000)
commite0f739cf93d84badbd6a572feb06d77d964c35e0
treefa6f23afac66294d33f673b50c63b1c637a6dc72
parent8d8068f391b1bb6e363c410d8fe9af09cc5898f9
LP#1418772: Avoid internal server error on viewing full record when copy create_date is null

In the TPAC client, when it tries to show record details containing a copy
record with no create date, it shows an Internal Server Error instead.

1. The error is caused by trying to execute the parse_datetime() method
in the parse_date() function in the WWW/EGCatLoader/util.pm module with
an empty date string. The function will normally translate a datetime
string from the database to a datetime string that is formatted for TPAC
templates.  The fix is to not execute parse_datetime() and just return
an empty string.

2. In the record/copy_table.tt2 template, if an empty datetime string is
the value for copy_info.create_date, the format() method of the Date
plugin will show the current datetime by default. The fix is to show '-'
in its place, replicating the same template logic as for
copy_info.due_date.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Conflicts:
Open-ILS/src/templates/opac/parts/record/copy_table.tt2
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
Open-ILS/src/templates/opac/parts/record/copy_table.tt2