Bugzilla – Attachment 113684 Details for
Bug 27038
Error when viewing a course reserve that has one or more items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27038: Fix parameters for AuthorisedValues.GetDescriptionByKohaField
Bug-27038-Fix-parameters-for-AuthorisedValuesGetDe.patch (text/plain), 3.39 KB, created by
Kyle M Hall
on 2020-11-16 20:27:27 UTC
(
hide
)
Description:
Bug 27038: Fix parameters for AuthorisedValues.GetDescriptionByKohaField
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2020-11-16 20:27:27 UTC
Size:
3.39 KB
patch
obsolete
>From a5b42daf665e71dd3fa3031538dd6bbd9e2965f0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 16 Nov 2020 15:25:47 -0500 >Subject: [PATCH] Bug 27038: Fix parameters for > AuthorisedValues.GetDescriptionByKohaField > >Calls to GetDescriptionByKohaField are a bit mangled in >course-details.tt and throw an error like: > >Template process failed: undef error - Can't use string ("NFIC") as a >HASH ref while "strict refs" in use at >/kohadevbox/koha/Koha/Template/Plugin/AuthorisedValues.pm line 83. > at /kohadevbox/koha/C4/Templates.pm line 122 > >Test Plan: >1) Check out master >2) Create a course >3) Add an item to the course >4) View the course >5) Note the error >6) Apply this patch >7) Reload the page >8) No error! >--- > .../prog/en/modules/course_reserves/course-details.tt | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index 32b33b6ba4..d6c66c6e64 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -127,18 +127,18 @@ > [% IF cr.course_item.enabled == 'yes' %] > <strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorized_value => cr.item.ccode ) | html %]</strong> > [% IF cr.item.ccode %] >- ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', cr.course_item.ccode_storage ) | html %]) >+ ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorized_value => cr.course_item.ccode_storage ) | html %]) > [% END %] > [% ELSE %] >- [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', cr.course_item.ccode ) | html %] >+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorized_value => cr.course_item.ccode ) | html %] > [% IF cr.item.ccode %] >- (<strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', cr.item.ccode ) | html %]</strong>) >+ (<strong>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorized_value => cr.item.ccode ) | html %]</strong>) > [% END %] > [% END %] > [% ELSE %] > <em>Unchanged</em> > [% IF cr.item.ccode %] >- ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', cr.item.ccode ) | html %]) >+ ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorized_value => cr.item.ccode ) | html %]) > [% END %] > [% END %] > </td> >-- >2.24.1 (Apple Git-126)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27038
: 113684