[open-ils-commits] [GIT] Evergreen ILS branch master updated. 461072dd9bfc2db3e23f2afd6fa0cc1f2e5f0663
Evergreen Git
git at git.evergreen-ils.org
Wed Sep 13 10:11:02 EDT 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 461072dd9bfc2db3e23f2afd6fa0cc1f2e5f0663 (commit)
from 9f1ec3a80ed1ec8d9df37290656cce74f61014cb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 461072dd9bfc2db3e23f2afd6fa0cc1f2e5f0663
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Tue Sep 12 17:45:09 2017 -0400
LP#1713160: fix crash viewing circ history in public catalog
This patch fixes a crash when a patron views their circulation
history in the public catalog.
To test
-------
[1] Set up a patron record that retains circ history and make
and returns some loans. Ensure that at least one of the
loans is aged.
[2] Log into the public catalog as the test patron and riew the
Check Out History page (/eg/opac/myopac/circ_history).
[3] Note that an internal server error is reported.
[4] Apply the patch, repeat step 2, and verify that the check out
history is now displayed.
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx at gmail.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 765ecf3..8295e12 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -1645,7 +1645,7 @@ sub fetch_user_circ_history {
my %flesh_ops = (
flesh => 3,
flesh_fields => {
- auch => ['target_copy'],
+ auch => ['target_copy','source_circ'],
acp => ['call_number'],
acn => ['record']
},
diff --git a/Open-ILS/src/templates/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates/opac/myopac/circ_history.tt2
index 423c4ff..1faffe6 100644
--- a/Open-ILS/src/templates/opac/myopac/circ_history.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circ_history.tt2
@@ -187,7 +187,12 @@
[% date.format(ctx.parse_datetime(circ.circ.xact_start),DATE_FORMAT); %]
</td>
<td>
- [% date.format(ctx.parse_datetime(circ.circ.due_date, circ.circ.circ_lib),DATE_FORMAT); %]
+ [% IF circ.circ.source_circ;
+ date.format(ctx.parse_datetime(circ.circ.due_date, circ.circ.source_circ.circ_lib),DATE_FORMAT);
+ ELSE;
+ date.format(ctx.parse_datetime(circ.circ.due_date, ctx.user.home_ou),DATE_FORMAT);
+ END;
+ %]
</td>
<td>
[% IF circ.circ.checkin_time;
-----------------------------------------------------------------------
Summary of changes:
.../lib/OpenILS/WWW/EGCatLoader/Account.pm | 2 +-
.../src/templates/opac/myopac/circ_history.tt2 | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list