https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32712 Bug ID: 32712 Summary: OPACShowCheckoutName makes OPAC explode Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org When OpacShoeCheckoutName is turned on, the OPAC shows this error if an item is checked out: Template process failed: undef error - The method Koha::Item->firstname is not covered by tests! I had talked to Joubu about it briefly, the fix could be: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc index 0573b90e068..be5dbf004f9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc @@ -47,15 +47,16 @@ [% IF datedue %] [% SET itemavailable = 0 %] + [% SET checkout_patron = item.checkout.patron %] [% IF onsite_checkout %] [% IF ( OPACShowCheckoutName ) %] - <span class="item-status checkedout">Currently in local use by [% item.firstname | html %] [% item.surname | html %] [% IF ( item.cardnumber ) %]([% item.cardnumber | html %])[% END %]</span> + <span class="item-status checkedout">Currently in local use by [% checkout_patron.firstname | html %] [% checkout_patron.surname | html %] [% IF ( checkout_patron.cardnumber ) %]([% checkout_patron.cardnumber | html %])[% END %]</span> [% ELSE %] <span class="item-status checkedout">Currently in local use</span> [% END %] [% ELSE %] [% IF ( OPACShowCheckoutName ) %] - <span class="item-status checkedout">Checked out to [% item.firstname | html %] [% item.surname | html %] [% IF ( item.cardnumber ) %]([% item.cardnumber | html %])[% END %]</span> + <span class="item-status checkedout">Checked out to [% checkout_patron.firstname | html %] [% checkout_patron.surname | html %] [% IF ( checkout_patron.cardnumber ) %]([% checkout_patron.cardnumber | html %])[% END %]</span> [% ELSE %] <span class="item-status checkedout">Checked out</span> [% END %] -- You are receiving this mail because: You are watching all bug changes.