Bugzilla – Attachment 78140 Details for
Bug 15524
Set limit on maximum possible holds per patron by category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15524: (RM follow-up) Fix calls and add filter
Bug-15524-RM-follow-up-Fix-calls-and-add-filter.patch (text/plain), 4.16 KB, created by
Nick Clemens (kidclamp)
on 2018-08-24 15:16:34 UTC
(
hide
)
Description:
Bug 15524: (RM follow-up) Fix calls and add filter
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-08-24 15:16:34 UTC
Size:
4.16 KB
patch
obsolete
>From 7007996eacb7574fb8b507993996c0faac1aded0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 24 Aug 2018 15:10:45 +0000 >Subject: [PATCH] Bug 15524: (RM follow-up) Fix calls and add filter > >--- > C4/Circulation.pm | 2 +- > C4/Reserves.pm | 2 +- > Koha/REST/V1/Hold.pm | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 2 +- > reserve/request.pl | 4 ++-- > 5 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 9c14365..77885d6 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1183,7 +1183,7 @@ sub checkHighHolds { > } > > # Remove any items that are not holdable for this patron >- @items = grep { CanItemBeReserved( $borrower->{borrowernumber}, $_->itemnumber ) eq 'OK' } @items; >+ @items = grep { CanItemBeReserved( $borrower->{borrowernumber}, $_->itemnumber )->{status} eq 'OK' } @items; > > my $items_count = scalar @items; > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 38f9953..3b1ac5e 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -299,7 +299,7 @@ sub CanBookBeReserved{ > { status => ageRestricted }, if the Item is age restricted for this borrower. > { status => damaged }, if the Item is damaged. > { status => cannotReserveFromOtherBranches }, if syspref 'canreservefromotherbranches' is OK. >- { status => tooManyReserves, limit => $limit }, if the borrower has exceeded his maximum reserve amount. >+ { status => tooManyReserves, limit => $limit }, if the borrower has exceeded their maximum reserve amount. > { status => notReservable }, if holds on this item are not allowed > > =cut >diff --git a/Koha/REST/V1/Hold.pm b/Koha/REST/V1/Hold.pm >index c152fb7..c3cb926 100644 >--- a/Koha/REST/V1/Hold.pm >+++ b/Koha/REST/V1/Hold.pm >@@ -91,7 +91,7 @@ sub add { > > unless ($can_reserve->{status} eq 'OK') { > return $c->render( status => 403, openapi => { >- error => "Reserve cannot be placed. Reason: $can_reserve" >+ error => "Reserve cannot be placed. Reason: ". $can_reserve->{status} > } ); > } > >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 df1798a..058e70a 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 >@@ -515,7 +515,7 @@ > <td>[% IF ( branch_cat_rule_loo.unlimited_max_holds ) %] > Unlimited > [% ELSE %] >- [% branch_cat_rule_loo.max_holds %] >+ [% branch_cat_rule_loo.max_holds | html %] > [% END %] > </td> > >diff --git a/reserve/request.pl b/reserve/request.pl >index 2fd36e8..cbbd35b 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -471,7 +471,7 @@ foreach my $biblionumber (@biblionumbers) { > !$item->{cantreserve} > && !$exceeded_maxreserves > && IsAvailableForItemLevelRequest($item, $patron_unblessed) >- && $can_item_be_reserved eq 'OK' >+ && $can_item_be_reserved->{status} eq 'OK' > ) > { > $item->{available} = 1; >@@ -479,7 +479,7 @@ foreach my $biblionumber (@biblionumbers) { > > push( @available_itemtypes, $item->{itype} ); > } >- elsif ( $can_item_be_reserved eq 'tooManyReserves' && C4::Context->preference('AllowHoldPolicyOverride') ) { >+ elsif ( $can_item_be_reserved->{status} eq 'tooManyReserves' && C4::Context->preference('AllowHoldPolicyOverride') ) { > # If AllowHoldPolicyOverride is set, it should override EVERY restriction, not just branch item rules > $item->{override} = 1; > $num_override++; >-- >2.1.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 15524
:
64707
|
64708
|
67180
|
67181
|
67531
|
70389
|
70390
|
70391
|
70392
|
71704
|
71705
|
71706
|
71737
|
71738
|
71739
|
71740
|
71741
|
77648
|
77681
|
77682
|
78134
|
78135
|
78136
|
78137
|
78138
|
78139
| 78140