Bugzilla – Attachment 53409 Details for
Bug 16856
unimarc plugin 4xx template noise
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16856 - unimarc plugin 4xx template noise
Bug-16856---unimarc-plugin-4xx-template-noise.patch (text/plain), 2.48 KB, created by
Marc Véron
on 2016-07-15 06:48:00 UTC
(
hide
)
Description:
Bug 16856 - unimarc plugin 4xx template noise
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-07-15 06:48:00 UTC
Size:
2.48 KB
patch
obsolete
>From 4948e8a83bfe5928145ddfda0fb67032bddaf0bf Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 5 Jul 2016 22:38:08 -0400 >Subject: [PATCH] Bug 16856 - unimarc plugin 4xx template noise >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >While fixing 10148, prove t/db_dependent/FrameworkPlugin.t was >run. This triggers UNIMARC 4xx plugin noise. > >The issue is that itypeloo.selected is not a property that >exists in the hash parameter to the template. > >git grep cataloguing/value_builder/unimarc_field_4XX.tt | grep -v [.]po: >The above was used to confirm that there is only one file which >affects that template: cataloguing/value_builder/unimarc_field_4XX.pl > >There is only one way for the Search value to evaluate to true: >the else case of the $op check (right at the bottom of the file). > >The value passed to the itypeloop parameter is a full search from >Koha::ItemTypes->search, which has no parameters passed to it, and >does not return a 'selected' key as part of the array of hashes. > >The logic to try to set "selected" in the template makes no sense, >as a result, since it is only called with a value that never has >"selected" set. The fix is easy: cut the useless code. > >TEST PLAN >--------- >1) prove t/db_dependent/FrameworkPlugin.t > -- see unimarc 4xx related noise. >2) apply patch >3) prove t/db_dependent/FrameworkPlugin.t > -- no more unimarc 4xx related noise. >4) run koha qa test tools > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > .../prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt | 4 ---- > 1 file changed, 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt >index 458c199..b784c3a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt >@@ -129,12 +129,8 @@ > <select name="itype" id="itypeloop"> > <option value="">All item types</option> > [% FOREACH itypeloo IN itypeloop %] >- [% IF ( itypeloo.selected ) %] >- <option value="[% itypeloo.itemtype %]" selected="selected">[% itypeloo.description |html %]</option> >- [% ELSE %] > <option value="[% itypeloo.itemtype %]">[% itypeloo.description |html %]</option> > [% END %] >- [% END %] > </select> > </p> > <p> >-- >1.7.10.4
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 16856
:
53121
| 53409