Bugzilla – Attachment 109627 Details for
Bug 26323
Not_for_loan, damaged, location and ccode values must be retrieved from the correct AV category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26323: Retrieve the correct NOT_LOAN value
Bug-26323-Retrieve-the-correct-NOTLOAN-value.patch (text/plain), 5.37 KB, created by
Jonathan Druart
on 2020-09-03 14:09:18 UTC
(
hide
)
Description:
Bug 26323: Retrieve the correct NOT_LOAN value
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-09-03 14:09:18 UTC
Size:
5.37 KB
patch
obsolete
>From 2394ecc3890e8df4d29cfdaffe35f442c3d06e7d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 Sep 2020 15:37:15 +0200 >Subject: [PATCH] Bug 26323: Retrieve the correct NOT_LOAN value > >From the template we are assuming that items.notforloan is mapped with >the NOT_LOAN authorised value category, but that is not necessarily the >case. > >We must retrieve the correct AV category >--- > .../prog/en/modules/circ/circulation_batch_checkouts.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >index 8483d5763b..d7de611c3f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >@@ -161,7 +161,7 @@ > [% IF checkout_info.itemtype_notforloan %] > <li><i class="fa fa-li fa-warning"></i>Item type is normally not for loan.</li> > [% ELSIF checkout_info.item_notforloan %] >- [% item_notforloan_lib = AuthorisedValues.GetByCode( 'NOT_LOAN', checkout_info.item_notforloan, 0 ) %] >+ [% item_notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => checkout_info.item_notforloan ) %] > <li><i class="fa fa-li fa-warning"></i>Item is normally not for loan [% IF item_notforloan_lib %]([% item_notforloan_lib | html %])[% END %].</li> > [% END %] > [% END %] >@@ -220,7 +220,7 @@ > [% IF checkout_info.itemtype_notforloan %] > <li><i class="fa fa-li fa-exclamation"></i>Item type not for loan.</li> > [% ELSIF checkout_info.item_notforloan %] >- [% item_notforloan_lib = AuthorisedValues.GetByCode( 'NOT_LOAN', checkout_info.item_notforloan, 0 ) %] >+ [% item_notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => checkout_info.item_notforloan ) %] > <li><i class="fa fa-li fa-exclamation"></i>Item not for loan [% IF item_notforloan_lib %]([% item_notforloan_lib | html %])[% END %].</li> > [% END %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 0647470a5e..57000fe467 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -197,13 +197,13 @@ > Not for loan status updated. > <br />Old value: > [% IF errmsgloo.NotForLoanStatusUpdated.from %] >- [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) | html %]. >+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.from ) | html %]. > [% ELSE %] > Available for loan. > [% END %] > <br />New value: > [% IF errmsgloo.NotForLoanStatusUpdated.to %] >- [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) | html %]. >+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.to ) | html %]. > [% ELSE %] > Available for loan. > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 984a71c415..802a69a3a5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -677,7 +677,7 @@ > [% END %] > > [% IF ( itemloo.notforloan ) %] >- <span class="nfl">Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %])</span> >+ <span class="nfl">Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemloo.notforloan ) | html %])</span> > [% END %] > </td> > <td> >-- >2.20.1
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 26323
:
109627
|
109628
|
109693
|
110767
|
110768
|
110769
|
110789
|
110790
|
110791
|
110792