Bugzilla – Attachment 107409 Details for
Bug 25758
Items scheduled for automatic renewal do not show that they will not renew due to a hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25758: Fix handle of checkouts without holds
Bug-25758-Fix-handle-of-checkouts-without-holds.patch (text/plain), 3.51 KB, created by
Jonathan Druart
on 2020-07-27 10:38:14 UTC
(
hide
)
Description:
Bug 25758: Fix handle of checkouts without holds
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-07-27 10:38:14 UTC
Size:
3.51 KB
patch
obsolete
>From 63124512ef56a0a9b5f55117983ddd102aee962a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 27 Jul 2020 12:37:42 +0200 >Subject: [PATCH] Bug 25758: Fix handle of checkouts without holds > >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 8 ++++---- > svc/checkouts | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 0481f1b786..531696881a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -517,9 +517,9 @@ $(document).ready(function() { > } > > var can_force_renew = ( oObj.onsite_checkout == 0 ) && >- ( !oObj.can_renew_error.includes("on_reserve") || (oObj.can_renew_error.includes("on_reserve") && AllowRenewalOnHoldOverride)) >+ ( !oObj.can_renew_error || !oObj.can_renew_error.includes("on_reserve") || (oObj.can_renew_error.includes("on_reserve") && AllowRenewalOnHoldOverride)) > ? true : false; >- var can_renew = ( oObj.renewals_remaining > 0 && !oObj.can_renew_error.length ); >+ var can_renew = ( oObj.renewals_remaining > 0 && ( !oObj.can_renew_error || !oObj.can_renew_error.length ) ); > content += "<span>"; > if ( can_renew || can_force_renew ) { > content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>"; >@@ -528,7 +528,7 @@ $(document).ready(function() { > if ( oObj.date_due_overdue && can_renew ) { > content += "checked='checked' "; > } >- if (oObj.can_renew_error.includes("on_reserve")) { >+ if (oObj.can_renew_error && oObj.can_renew_error.includes("on_reserve")) { > content += "data-on-reserve "; > } > content += "class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>" >@@ -550,7 +550,7 @@ $(document).ready(function() { > "bSortable": false, > "bVisible": AllowCirculate ? true : false, > "mDataProp": function ( oObj ) { >- if ( oObj.can_renew_error.includes("on_reserve") ) { >+ if ( oObj.can_renew_error && oObj.can_renew_error.includes("on_reserve") ) { > return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"; > } else { > return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>"; >diff --git a/svc/checkouts b/svc/checkouts >index edcb888738..0638fc4cf4 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -149,7 +149,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > my ( $can_renew, $can_renew_error ) = > CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} ); > my $can_renew_date = >- @$can_renew_error && $can_renew_error->[0] eq 'too_soon' >+ $can_renew_error && $can_renew_error->[0] eq 'too_soon' > ? output_pref( > { > dt => GetSoonestRenewDate( $c->{borrowernumber}, $c->{itemnumber} ), >-- >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 25758
:
106229
|
107409
|
107495
|
107496
|
107504
|
107879
|
107894
|
109139
|
109658
|
109668
|
109672
|
109680
|
110008
|
110009
|
110010