Bugzilla – Attachment 99172 Details for
Bug 24669
Editing circulation rule breaks holds when total holds unlimited
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24669: Show "Unlimited" values correctly in smart-rules.pl
Bug-24669-Show-Unlimited-values-correctly-in-smart.patch (text/plain), 3.29 KB, created by
Jonathan Druart
on 2020-02-18 10:50:04 UTC
(
hide
)
Description:
Bug 24669: Show "Unlimited" values correctly in smart-rules.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-18 10:50:04 UTC
Size:
3.29 KB
patch
obsolete
>From 35e5113fb51f8fbc44b44772f88688de36b944a9 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Mon, 17 Feb 2020 10:32:26 +0000 >Subject: [PATCH] Bug 24669: Show "Unlimited" values correctly in > smart-rules.pl > >The rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per >record (count)" were not set empty when in rule editing. Also, the >text "Unlimited" was not shown for rule "Holds per record (count)" >even though it should have been since empty value means unlimited >holds per record. > >To test: >1. Apply patch >2. Edit the rules "Holds allowed (total)", "Holds allowed (daily)", "Holds per >record (count)" to be empty and save >3. Make sure all of the above rules now say Unlimited >4. Edit the rules again and make sure the above rules are now in the >rule editing empty. > >Sponsored-by: The National Library of Finland > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >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 ed737af2cd..e40138b31b 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 >@@ -262,7 +262,13 @@ > <span>Unlimited</span> > [% END %] > </td> >- <td>[% holds_per_record | html %]</td> >+ <td> >+ [% IF holds_per_record.defined && holds_per_record != '' %] >+ [% holds_per_record | html %] >+ [% ELSE %] >+ <span>Unlimited</span> >+ [% END %] >+ </td> > <td> > [% IF onshelfholds == 1 %] > <span>Yes</span> >@@ -1016,11 +1022,13 @@ > // Remove potential previous input added > $(current_column).find("input").remove(); > $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />"); >- } else if ( i == 4 || i == 5 || i == 25 ) { >+ } else if ( i == 4 || i == 5 || i == 24 || i == 25 || i == 26 ) { > // If the value is not an integer for > // - "Current checkouts allowed" > // - "Current on-site checkouts allowed" >+ // - "Holds allowed (total)" > // - "Holds allowed (daily)" >+ // - "Holds per record (count)" > // The value is "Unlimited" (or an equivalent translated string) > // an it should be set to an empty string > if( !((parseFloat(itm) == parseInt(itm)) && !isNaN(itm)) ) { >-- >2.11.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 24669
:
99079
|
99080
|
99171
|
99172
|
99216
|
99217
|
99251