Bugzilla – Attachment 90540 Details for
Bug 23095
Circulation rules not displayed (empty vs null)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23095: Correctly display circulation rules (0 vs undef)
Bug-23095-Correctly-display-circulation-rules-0-vs.patch (text/plain), 2.12 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-06-12 20:04:28 UTC
(
hide
)
Description:
Bug 23095: Correctly display circulation rules (0 vs undef)
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-06-12 20:04:28 UTC
Size:
2.12 KB
patch
obsolete
>From 67fb00293036a612ae901f9bfd1c0849cd9a5699 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 11 Jun 2019 10:44:25 -0500 >Subject: [PATCH] Bug 23095: Correctly display circulation rules (0 vs undef) > >From the following commit: > commit d1303ca834dd0b08fc1d44476cfbbb8b729b6165 > Bug 18925: (follow-up) Fix null/empty behavior > >The global test must have been adjusted as well to catch empty strings. > >Actually we are expecting the plugin to return undef but the template variable contains an empty string. > >So the test should only be [% IF var != '' %] instead of [% IF var.defined && var != '' %] >but I prefer to keep it as it for now. > >Test plan: >In the section "Default checkout, hold policy by patron category" >Set total checkouts = blank > total on-site checkouts = blank > total holds = 0 >Save >=> Without this patch the line will not appear >=> With this patch applied there must be "unlimited, unlimited, 0" > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index a2a6e3f757..b71c172a98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -538,7 +538,7 @@ > [% SET patron_maxonsiteissueqty = CirculationRules.Search( branchcode, c, undef, 'patron_maxonsiteissueqty' ) %] > [% SET max_holds = CirculationRules.Search( branchcode, c, undef, 'max_holds' ) %] > >- [% IF patron_maxissueqty || patron_maxonsiteissueqty || max_holds %] >+ [% IF ( patron_maxissueqty.defined && patron_maxissueqty != '' ) || ( patron_maxonsiteissueqty.defined && patron_maxonsiteissueqty != '' ) || ( max_holds.defined && max_holds != '' ) %] > <tr> > <td> > [% IF c == '*'%] >-- >2.22.0
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 23095
:
90502
|
90510
| 90540