Bugzilla – Attachment 128130 Details for
Bug 29115
Placing a club hold is not showing warnings when unable to place a hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29115: Fix syntax errors in club hold functionality
Bug-29115-Fix-syntax-errors-in-club-hold-functiona.patch (text/plain), 4.02 KB, created by
Jonathan Druart
on 2021-12-01 14:50:16 UTC
(
hide
)
Description:
Bug 29115: Fix syntax errors in club hold functionality
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-12-01 14:50:16 UTC
Size:
4.02 KB
patch
obsolete
>From 622548fa7a6784ee1c5e896cb36d6ca7541f6d59 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@iki.fi> >Date: Sun, 26 Sep 2021 15:36:45 +0000 >Subject: [PATCH] Bug 29115: Fix syntax errors in club hold functionality > >The code didn't previously correctly do the checks for patron >debarment status and whether the patron has fees, this caused the >intended warnings messages to not appear when they should have. > >To test: > 1) Create a new club and add a patron to it who has manual debarment > and a manual charge of over $5 (more than the maxoutstanding syspref). > 2) Try to create a new club hold for the previously created club and > notice no warnings are listed for the patron. > 3) Apply patch > 4) Try to create now the club hold again and notice the warnings > being shown in the hold page. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../intranet-tmpl/prog/en/modules/reserve/request.tt | 4 ++-- > reserve/request.pl | 8 +------- > 2 files changed, 3 insertions(+), 9 deletions(-) > >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 b1ab990f13b..f827863ddf8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -247,7 +247,7 @@ > <strong>Too many holds: </strong> Patron can only place a maximum of [% maxreserves | html %] total holds. > </div> > [% END %] >- [% IF ( member.expiry ) %] >+ [% IF ( patron.is_expired ) %] > <div> > <i class="fa fa-warning"></i> > <strong>Account has expired</strong> >@@ -259,7 +259,7 @@ > <strong>Patron has restrictions</strong> > </div> > [% END %] >- [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %] >+ [% IF member.amount_outstanding && Koha.Preference('maxoutstanding') && member.amount_outstanding > Koha.Preference('maxoutstanding') %] > <div> > <i class="fa fa-warning"></i> > <strong>Patron has outstanding fines: [% member.amount_outstanding | $Price %]</strong> >diff --git a/reserve/request.pl b/reserve/request.pl >index 10fa575f11e..a635ab13483 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -253,7 +253,7 @@ if ($club_hold && !$borrowernumber_hold && !$action) { > > while(my $enrollment = $enrollments->next) { > next if $enrollment->is_canceled; >- my $member = { patron => $enrollment->patron->unblessed }; >+ my $member = { patron => $enrollment->patron }; > my $reserves_count = $enrollment->patron->holds->count; > if ( $maxreserves > && ( $reserves_count + $new_reserves_count > $maxreserves ) ) >@@ -263,12 +263,6 @@ if ($club_hold && !$borrowernumber_hold && !$action) { > : 0; > $member->{exceeded_maxreserves} = 1; > } >- my $expiry_date = $enrollment->patron->dateexpiry; >- $member->{expiry} = 0; # flag set if patron account has expired >- if ($expiry_date and >- Date_to_Days(split /-/,$date) > Date_to_Days(split /-/,$expiry_date)) { >- $member->{expiry} = 1; >- } > $member->{amount_outstanding} = $enrollment->patron->account->balance; > if ( $enrollment->patron->branchcode ne C4::Context->userenv->{'branch'} ) { > $member->{diffbranch} = 1; >-- >2.25.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 29115
:
125340
|
126083
| 128130