Bugzilla – Attachment 84551 Details for
Bug 15565
Place multiple item-level holds at once for the same record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15565: (follow-up) Changes to maximum hold allowed logic
Bug-15565-follow-up-Changes-to-maximum-hold-allowe.patch (text/plain), 24.67 KB, created by
Aleisha Amohia
on 2019-01-31 01:05:32 UTC
(
hide
)
Description:
Bug 15565: (follow-up) Changes to maximum hold allowed logic
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2019-01-31 01:05:32 UTC
Size:
24.67 KB
patch
obsolete
>From 66c61608a72b5fc56bd7ad478d9e85f17f5835fe Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Sun, 28 Oct 2018 22:10:43 +0000 >Subject: [PATCH] Bug 15565: (follow-up) Changes to maximum hold allowed logic > >Implemented changes to the logic to address Katrin Fischer's points in >comment #175, also changed the modal box wording to use 'hold' not >'reserve' > >Also updated t/db_dependent/Reserves/MultiplePerRecord.t test to reflect >moving function. > >Added the display of the JS modal box informing OPAC borrower that >they have exceeded hold limit after they click 'A specific item' >radiobutton on opac-reserve if holds per day, holds per record or >maxreserves is 1 > >Test plan: >1. Apply patches >2. Restart memcached and plack >3. Run t/db_dependent/Reserves/MultiplePerRecord.t >4. Set your maxreserves syspref to 3, and a circ rules holds per record >to 2 and holds per day to 1 >5. In the OPAC visit the 'Place hold' interface of item. Select the 'A >specific item' radiobutton and observe the first item checkbox is >checked and other unchecked checkboxes are disabled. >6. Repeat step 4 this time setting holds per day to 5 >7. Now reloading the OPAC 'Place hold' page notice after clicking 'A >specific item' no modal displays >8. Select a second item checkbox and observe a modal saying you have reached >the maximum number of holds for the record is loaded - notice the >wording 'hold' not 'reserve' in use in the modal box >9. Click 'OK' on modal and observe all unchecked item checkboxes are >automatically disabled to prevent additional holds being placed >10. Select 'Confirm hold' >11. On your holds summary page confirm both holds are placed >12. In the staff client set the 'AllowHoldPolicyOverride' syspref to >"Don't allow" >13. Visit a biblio reservation interface in the staff client >14. Select 2 item checkboxes and observe the modal box explaining you >have reached maximum holds for the record is displayed - notice the >wording of 'hold' not 'reserve' is used in the modal box. >15. Select 'OK' on the modal and notice all un-checked item checkboxes >are automatically disabled >16. Repeat steps 12-15 this time with the value of >'AllowHoldPolicyOverride' syspref set to 'Allow' and notice that once >you have clicked on the second item checkbox although the modal still >loads the item checkboxes do not disable - you are able to override and >continue selecting checkboxes each time with modal warning loading. > >17. In both the OPAC and staff client try placing a record level hold, >selecting a value from the 'Holds to place (count)' dropdown. Notice >that the maximum value of this is the lowest value out of the 'maximum >number of holds per record', 'maximum number of holds per day' and the >'maxreserves' system preference so in this case it will be 2 >18. Save and notice 2 holds are placed > >19. Observe the allow_holds() function is in the Koha/Biblio.pm file and >the GetAllowedHoldsForPatronToday() function has been removed from >C4/Reserves.pm > >Sponsored-By: Brimbank Library, Australia >--- > C4/Reserves.pm | 1 + > Koha/Biblio.pm | 32 ++++++++++++++ > .../prog/en/modules/reserve/request.tt | 25 +++++++++-- > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 1 + > .../opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 50 +++++++++++++++++++--- > opac/opac-reserve.pl | 21 ++++++++- > reserve/request.pl | 25 ++++++++++- > t/db_dependent/Reserves/MultiplePerRecord.t | 19 +++++++- > 8 files changed, 162 insertions(+), 12 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 4f280a5..efbbff2 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -4,6 +4,7 @@ package C4::Reserves; > # 2006 SAN Ouest Provence > # 2007-2010 BibLibre Paul POULAIN > # 2011 Catalyst IT >+# 2018 Catalyst IT > # > # This file is part of Koha. > # >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 1dca4d9..b742ccc 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -425,6 +425,38 @@ sub has_items_waiting_or_intransit { > return 0; > } > >+=head3 allowed_holds >+ >+my $holds_allowed_on_record_today = $biblio->allowed_holds( $patron_obj ); >+ >+Calculates and returns the number of item-level holds a borrower is allowed to place on the record on a single day. >+ >+=cut >+ >+sub allowed_holds { >+ >+ my ( $self, $patron ) = @_; >+ >+ my $controlbranch = C4::Context->preference('ReservesControlBranch'); >+ >+ my $categorycode = $patron->categorycode; >+ my $branchcode; >+ $branchcode = $patron->branchcode if ( $controlbranch eq "PatronLibrary" ); >+ >+ my $holds_allowed = 0; >+ foreach my $item ( $self->items()->as_list() ) { >+ my $itemtype = $item->effective_itemtype(); >+ $branchcode = $item->homebranch if ( $controlbranch eq "ItemHomeLibrary" ); >+ >+ my $rule = C4::Reserves::GetHoldRule( $categorycode, $itemtype, $branchcode ); >+ my $holds_per_day = $rule ? $rule->{holds_per_day} : 0; >+ if ( $holds_per_day ) { >+ $holds_allowed = $holds_per_day if $holds_per_day > $holds_allowed; >+ } >+ } >+ return $holds_allowed; >+} >+ > =head3 type > > =cut >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 115cdb8..199a6cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -249,7 +249,7 @@ > [% IF remaining_holds_for_record > 1 %] > <li> > <label for="holds_to_place_count">Holds to place (count)</label> >- <input type="number" name="holds_to_place_count" min="1" max="[% remaining_holds_for_record | html %]" step="1" value="1" /> >+ <input type="number" name="holds_to_place_count" min="1" max="[% lowest_value | html %]" step="1" value="1" /> > </li> > [% ELSE %] > <input type="hidden" name="holds_to_place_count" value="1" /> >@@ -671,8 +671,12 @@ > [% END %][% END %][% END %] > }; > var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items."); >- var MSG_EXCEEDED_HOLDS_PER_RECORD = _("Patron has exceeded the number of holds for this record."); >+ var MSG_EXCEEDED_HOLDS_PER_RECORD = _("Patron reached the maximum number of holds for this record."); >+ var MSG_EXCEEDED_HOLDS_PER_DAY = _("Patron reached the maximum number of holds allowed today."); >+ var MSG_EXCEEDED_MAXRESERVES_SYSPREF = _("Patron reached the maximum number of holds allowed at once"); > var remainingHolds = "[% remaining_holds_for_record | html %]"; >+ var remainingHoldsToday = "[% remainig_holds_allowed_today | html %]"; >+ var maxreserves = "[% maxreserves | html %]"; > > $(document).ready(function() { > function ToggleHoldsToPlace() { >@@ -808,8 +812,23 @@ > } else { > $("#requestany").prop("checked",true); > } >- if (remainingHolds - numchecked < 0) { >+ if (remainingHolds - numchecked <= 0) { > alert(MSG_EXCEEDED_HOLDS_PER_RECORD); >+ [% IF !(Koha.Preference('AllowHoldPolicyOverride')) %] >+ $('input[name=checkitem]:not(:checked)').attr('disabled', 'disabled'); >+ [% END %] >+ } >+ if (remainingHoldsToday - numchecked <= 0) { >+ alert(MSG_EXCEEDED_HOLDS_PER_DAY); >+ [% IF !(Koha.Preference('AllowHoldPolicyOverride')) %] >+ $('input[name=checkitem]:not(:checked)').attr('disabled', 'disabled'); >+ [% END %] >+ } >+ if (maxreserves - numchecked <= 0) { >+ alert(MSG_EXCEEDED_MAXRESERVES_SYSPREF); >+ [% IF !(Koha.Preference('AllowHoldPolicyOverride')) %] >+ $('input[name=checkitem]:not(:checked)').attr('disabled', 'disabled'); >+ [% END %] > } > }); > var prev_rank_request; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index 5db72ee..c99eb7c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -3004,6 +3004,7 @@ button.closebtn { > > .hold-options { > clear: both; >+ width: auto; > } > > .toggle-hold-options { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index 0e1851d..a3716c1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -156,6 +156,7 @@ > [% FOREACH bibitemloo IN bibitemloop %] > <div class="holdrow"> > <input id="remaining_holds_[% bibitemloo.biblionumber | html %]" type="hidden" value="[% bibitemloo.remaining_holds_for_record | html %]"/> >+ <input id="remaining_holds_allowed_today[% bibitemloo.biblionumber | html %]" type="hidden" value="[% bibitemloo.remaining_holds_allowed_today | html %]"/> > <p> > [% IF ( bibitemloo.holdable ) %] > <span title="[% bibitemloo.biblionumber %]" style="padding:.3em"> >@@ -302,8 +303,10 @@ > </li> > [% END # / IF OpacHoldNotes %] > >+ [% IF bibitemloo.itemholdable %] > <!-- ITEM HOLDS --> > <li class="lradio place_on_type" style="display:none;"> >+ [% IF NOT bibitemloo.force_hold %] > <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label> > <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]" > id="reqany_[% bibitemloo.biblionumber | html %]" >@@ -311,6 +314,7 @@ > value="Any" > checked="checked" > /> >+ [% END %] > <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber | html %]">A specific item</label> > <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]" > id="reqspecific_[% bibitemloo.biblionumber | html %]" >@@ -318,6 +322,7 @@ > value="Specific" > /> > </li> >+ [% END # / IF bibitemloo.itemholdable %] > </ul> > > [% IF bibitemloo.remaining_holds_for_record > 1 %] >@@ -325,7 +330,7 @@ > <div id="holds_to_place_[% bibitemloo.biblionumber | html %]" class="hold-options holds-to-place"> > <label>Holds to place (count)</label> > <select name="holds_to_place_count_[% bibitemloo.biblionumber | html %]"> >- [% WHILE count <= bibitemloo.remaining_holds_for_record %] >+ [% WHILE count <= bibitemloo.lowest_value %] > <option value="[% count | html %]">[% count | html %]</option> > [% SET count = count + 1 %] > [% END %] >@@ -462,7 +467,9 @@ > <script> > // <![CDATA[ > var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection."); >- var MSG_MAX_HOLDS_EXCEEDED = _("Maximum number of reserve exceded."); >+ var MSG_MAX_HOLDS_EXCEEDED = _("Maximum number of holds for this record reached."); >+ var MSG_EXCEEDED_HOLDS_PER_DAY = _("Maximum number of holds allowed today reached."); >+ var MSG_EXCEEDED_MAXRESERVES_SYSPREF = _("Maximum number of holds allowed at once reached"); > > // Clear the contents of an input field > $(".clearfield").on("click",function(e){ >@@ -497,10 +504,20 @@ > $('.checkitem').click(function(e) { > var bibNum = suffixOf($(this).attr("name"), "_"); > var nbCheked = $("input[name='checkitem_"+bibNum+"']:checked").length; >- var remaining = $("input[id='remaining_holds_"+bibNum+"']").val(); >+ var remaining = $("input[id='remaining_holds_allowed_today"+bibNum+"']").val(); >+ var maxreserves = "[% maxreserves | html %]"; > if (nbCheked >= remaining) { >+ alert(MSG_MAX_HOLDS_EXCEEDED); >+ $("input[name='checkitem_"+bibNum+"']:not(:checked)").attr('disabled', 'disabled'); >+ } >+ else if (nbCheked >= remaining_holds_today) { >+ alert(MSG_EXCEEDED_HOLDS_PER_DAY); > $("input[name='checkitem_"+bibNum+"']:not(:checked)").attr('disabled', 'disabled'); > } >+ else if (nbCheked >= maxreserves) { >+ alert(MSG_EXCEEDED_MAXRESERVES_SYSPREF); >+ $("input[name='checkitem_"+bibNum+"']:not(:checked)").attr('disabled', 'disabled'); >+ } > else { > $('.checkitem_'+bibNum).attr('disabled', false); > } >@@ -530,8 +547,6 @@ > $("#toggle-hold-options-[% bibitemloo.biblionumber | html %]").click(); > $("#reqany_[% bibitemloo.biblionumber | html %]").attr('checked', true); > [% END %] >- $("#reqany_[% bibitemloo.biblionumber | html %]").attr('disabled', 'disabled'); >- $("#reqspecific_[% bibitemloo.biblionumber | html %]").attr('disabled', 'disabled'); > [% END %] > [% IF bibitemloo.reqholdnotes %] > $("#holdnotes_[% bibitemloo.biblionumber | html %]").attr( 'required', true ); >@@ -562,6 +577,31 @@ > if ( $(checkbox).is(":checked") && select_specific ) { > $(newCopiesRowId).show(); > $(holdsToPlaceCountId).hide(); >+ >+ //Check if maximum holds is reached and if it has then disable un-checked item checkboxes and display message >+ var nbCheked = 1; >+ var remaining = $("input[id='remaining_holds_"+biblioNum+"']").val(); >+ var remaining_holds_today = $("input[id='remaining_holds_allowed_today"+biblioNum+"']").val(); >+ var maxreserves = "[% maxreserves | html %]"; >+ if (nbCheked == remaining) { >+ if (remaining != '1') { >+ alert(MSG_MAX_HOLDS_EXCEEDED); >+ } >+ >+ $("input[name='checkitem_"+biblioNum+"']:not(:checked)").attr('disabled', 'disabled'); >+ } >+ else if (nbCheked == remaining_holds_today) { >+ if (remaining_holds_today != '1') { >+ alert(MSG_EXCEEDED_HOLDS_PER_DAY); >+ } >+ $("input[name='checkitem_"+biblioNum+"']:not(:checked)").attr('disabled', 'disabled'); >+ } >+ else if (nbCheked == maxreserves) { >+ if (maxreserves != '1') { >+ alert(MSG_EXCEEDED_MAXRESERVES_SYSPREF); >+ } >+ $("input[name='checkitem_"+biblioNum+"']:not(:checked)").attr('disabled', 'disabled'); >+ } > } else { > $(newCopiesRowId).hide(); > $(holdsToPlaceCountId).show(); >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 0bea231..eb807fa 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -44,6 +44,7 @@ use Koha::Libraries; > use Koha::Patrons; > use Date::Calc qw/Today Date_to_Days/; > use List::MoreUtils qw/uniq/; >+use List::Util qw[min max]; > > my $maxreserves = C4::Context->preference("maxreserves"); > >@@ -65,6 +66,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >+$template->param(maxreserves => $maxreserves); >+ > my ($show_holds_count, $show_priority); > for ( C4::Context->preference("OPACShowHoldQueueDetails") ) { > m/holds/o and $show_holds_count = 1; >@@ -113,7 +116,7 @@ my @biblionumbers = ref($query->param('biblionumbers')) eq 'Array' > : split(/\//, $query->param('biblionumbers')); > > unless (@biblionumbers) { >- push(@biblionumbers, $query->param('biblionumber')); >+ push(@biblionumbers, $query->multi_param('biblionumber')); > } > > # Pass the numbers to the page so they can be fed back >@@ -283,7 +286,7 @@ if ( $query->param('place_reserve') ) { > print $query->redirect("/cgi-bin/koha/opac-user.pl?" . ( $failed_holds ? "failed_holds=$failed_holds" : q|| ) . "#opac-user-holds"); > exit; > } >- $canreserve = 0 unless CanBookBeReserved( $borrowernumber, $biblioNum ) eq 'OK'; >+ $canreserve = 0 unless CanBookBeReserved( $borrowernumber, $biblioNum )->{status} eq 'OK'; > > unless ( $can_place_hold_if_available_at_pickup ) { > my $items_in_this_library = Koha::Items->search({ biblionumber => $biblioNum, holdingbranch => $branch }); >@@ -629,8 +632,22 @@ foreach my $biblioNum (@biblionumbers) { > > my $max_holds_for_record = GetMaxPatronHoldsForRecord( $borrowernumber, $biblioNum ); > my $remaining_holds_for_record = $max_holds_for_record - $holds->count(); >+ >+ my $today_holds = Koha::Holds->search({ >+ borrowernumber => $borrowernumber, >+ reservedate => dt_from_string->date >+ }); >+ >+ my $biblio_record = Koha::Biblios->find( $biblioNum ); >+ my $patron_obj = Koha::Patrons->find( $borrowernumber ); >+ my $holds_allowed_on_record_today = $biblio_record->allowed_holds( $patron_obj ); >+ my $remaining_holds_allowed_today = $holds_allowed_on_record_today - $today_holds->count(); > $biblioLoopIter{remaining_holds_for_record} = $remaining_holds_for_record; >+ $biblioLoopIter{remaining_holds_allowed_today} = $remaining_holds_allowed_today; > >+ #Determine what is the lowest value >+ my $lowestvalue = min($maxreserves, $remaining_holds_for_record, $remaining_holds_allowed_today); >+ $biblioLoopIter{lowest_value} = $lowestvalue; > > push @$biblioLoop, \%biblioLoopIter; > >diff --git a/reserve/request.pl b/reserve/request.pl >index 91b6ffd..dd9eb88 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -30,6 +30,7 @@ use Modern::Perl; > > use CGI qw ( -utf8 ); > use List::MoreUtils qw/uniq/; >+use List::Uil qw[min max]; > use Date::Calc qw/Date_to_Days/; > use C4::Output; > use C4::Auth; >@@ -39,7 +40,6 @@ use C4::Items; > use C4::Koha; > use C4::Serials; > use C4::Circulation; >-use Koha::DateUtils; > use C4::Utils::DataTables::Members; > use C4::Members; > use C4::Search; # enabled_staff_search_views >@@ -264,9 +264,32 @@ foreach my $biblionumber (@biblionumbers) { > # we must find out what the maximum number of holds they can place for the patron is > my $max_holds_for_record = GetMaxPatronHoldsForRecord( $patron->borrowernumber, $biblionumber ); > my $remaining_holds_for_record = $max_holds_for_record - $holds->count(); >+ >+ # Determine how many holds the patron can place per day on this biblio record. >+ # Then calculate how many holds the patron can place subtracting holds already placed today >+ my $today_holds = Koha::Holds->search({ >+ borrowernumber => $patron->borrowernumber, >+ reservedate => dt_from_string->date >+ }); >+ >+ my $biblio_record = Koha::Biblios->find( $biblionumber ); >+ my $patron_obj = Koha::Patrons->find( $patron->borrowernumber ); >+ my $holds_allowed_on_record_today = $biblio_record->allowed_holds( $patron_obj ); >+ my $remaining_holds_allowed_today = $holds_allowed_on_record_today - $today_holds->count(); >+ my $maxreserves = C4::Context->preference('maxreserves'); >+ > $biblioloopiter{remaining_holds_for_record} = $max_holds_for_record; >+ $biblioloopiter{remaining_holds_allowed_today} = $holds_allowed_on_record_today; >+ >+ # Determine what is the lowest value >+ my $lowestvalue = min($maxreserves, $biblioloopiter{remaining_holds_for_record}, $biblioloopiter{remaining_holds_allowed_today}); >+ >+ $template->param( lowest_value => $lowestvalue ); > $template->param( max_holds_for_record => $max_holds_for_record ); > $template->param( remaining_holds_for_record => $remaining_holds_for_record ); >+ $template->param( holds_allowed_on_record_today => $holds_allowed_on_record_today ); >+ $template->param( remaining_holds_allowed_today => $remaining_holds_allowed_today ); >+ $template->param( maxreserves => $maxreserves ); > > { # alreadypossession > # Check to see if patron is allowed to place holds on records where the >diff --git a/t/db_dependent/Reserves/MultiplePerRecord.t b/t/db_dependent/Reserves/MultiplePerRecord.t >index 7f639ce..5d6eaa2 100755 >--- a/t/db_dependent/Reserves/MultiplePerRecord.t >+++ b/t/db_dependent/Reserves/MultiplePerRecord.t >@@ -1,6 +1,7 @@ > #!/usr/bin/perl > > # Copyright 2016 ByWater Solutions >+# Copyright 2018 Catalyst IT > # > # This file is part of Koha. > # >@@ -19,7 +20,7 @@ > > use Modern::Perl; > >-use Test::More tests => 38; >+use Test::More tests => 42; > use t::lib::TestBuilder; > use t::lib::Mocks; > >@@ -197,11 +198,19 @@ my $rule4 = $rules_rs->new( > branchcode => '*', > reservesallowed => 4, > holds_per_record => 4, >+ holds_per_day => 4, > } > )->insert(); > > $max = GetMaxPatronHoldsForRecord( $patron->{borrowernumber}, $biblio->{biblionumber} ); > is( $max, 4, 'GetMaxPatronHoldsForRecord returns max of 4' ); >+ >+my $biblio_record = Koha::Biblios->find( $biblio->{biblionumber} ); >+my $patron_obj = Koha::Patrons->find( $patron->{borrowernumber} ); >+ >+my $holds_per_day = $biblio_record->allowed_holds( $patron_obj ); >+is( $holds_per_day, 4, 'GetAllowedHoldsForPatronToday returns max of 4' ); >+ > $rule = C4::Reserves::GetHoldRule( > $category->{categorycode}, > $itemtype2->{itemtype}, >@@ -212,6 +221,7 @@ is( $rule->{itemtype}, $itemtype2->{itemtype}, 'Got rule with univers > is( $rule->{branchcode}, '*', 'Got rule with universal branchcode' ); > is( $rule->{reservesallowed}, 4, 'Got reservesallowed of 4' ); > is( $rule->{holds_per_record}, 4, 'Got holds_per_record of 4' ); >+is( $rule->{holds_per_day}, 4, 'Got holds_per_day of 4' ); > > my $rule5 = $rules_rs->new( > { >@@ -220,11 +230,16 @@ my $rule5 = $rules_rs->new( > branchcode => $library->{branchcode}, > reservesallowed => 5, > holds_per_record => 5, >+ holds_per_day => 5, > } > )->insert(); > > $max = GetMaxPatronHoldsForRecord( $patron->{borrowernumber}, $biblio->{biblionumber} ); > is( $max, 5, 'GetMaxPatronHoldsForRecord returns max of 1' ); >+ >+$holds_per_day = $biblio_record->allowed_holds( $patron_obj ); >+is( $holds_per_day, 5, 'GetAllowedHoldsForPatronToday returns max of 5' ); >+ > $rule = C4::Reserves::GetHoldRule( > $category->{categorycode}, > $itemtype2->{itemtype}, >@@ -235,6 +250,7 @@ is( $rule->{itemtype}, $itemtype2->{itemtype}, 'Got rule with univers > is( $rule->{branchcode}, $library->{branchcode}, 'Got rule with specific branchcode' ); > is( $rule->{reservesallowed}, 5, 'Got reservesallowed of 5' ); > is( $rule->{holds_per_record}, 5, 'Got holds_per_record of 5' ); >+is( $rule->{holds_per_day}, 5, 'Got holds_per_day of 5' ); > > $rule1->delete(); > $rule2->delete(); >@@ -273,6 +289,7 @@ $rule = $rules_rs->new( > branchcode => '*', > reservesallowed => 2, > holds_per_record => 2, >+ holds_per_day => 2, > } > )->insert(); > >-- >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 15565
:
47527
|
47551
|
47552
|
50068
|
50069
|
50392
|
50393
|
56229
|
56230
|
56231
|
56232
|
56458
|
56510
|
56511
|
56512
|
56513
|
56514
|
56515
|
56517
|
56518
|
56519
|
56520
|
56521
|
56522
|
56523
|
56524
|
61244
|
61245
|
61246
|
61247
|
61248
|
61576
|
61577
|
61578
|
61579
|
61580
|
64590
|
64591
|
64592
|
64593
|
64594
|
66594
|
66595
|
66596
|
66597
|
66598
|
68759
|
68760
|
68761
|
68762
|
68763
|
71643
|
71644
|
71645
|
71646
|
71647
|
71648
|
72644
|
72645
|
72646
|
72647
|
72648
|
72649
|
78242
|
78243
|
78244
|
78245
|
78246
|
78247
|
78248
|
78266
|
78305
|
78417
|
78418
|
78419
|
78420
|
78421
|
78422
|
78423
|
78424
|
78425
|
78426
|
78712
|
78713
|
78714
|
78715
|
78716
|
78717
|
78718
|
78719
|
78720
|
78815
|
78816
|
78817
|
78818
|
78819
|
78820
|
78821
|
78822
|
78823
|
81419
|
81420
|
81421
|
81422
|
81423
|
81424
|
81425
|
81426
|
81427
|
81431
|
81449
|
81570
|
81571
|
81572
|
81573
|
81574
|
81575
|
81576
|
81577
|
81578
|
81579
|
81580
|
81581
|
82205
|
82206
|
82207
|
82208
|
82209
|
82210
|
82211
|
82212
|
82213
|
82214
|
82215
|
82216
|
82220
|
82221
|
83331
|
83332
|
83333
|
83334
|
83335
|
83336
|
83337
|
83338
|
83339
|
83340
|
83341
|
83342
|
83378
|
83380
|
83381
|
84541
|
84542
|
84543
|
84544
|
84545
|
84546
|
84547
|
84548
|
84549
|
84550
|
84551
|
84552
|
84553
|
87979
|
87980
|
87981
|
87982
|
87983
|
87984
|
87985
|
87986
|
87987
|
87988
|
87989
|
87990
|
87991
|
117128
|
117129
|
117130
|
117131
|
117132
|
117133
|
120365
|
120366
|
120367
|
120639
|
120640
|
120641
|
121941
|
122098
|
162071
|
162072
|
162073
|
162074
|
163052
|
163053
|
163054
|
163055
|
163092
|
163093
|
166005
|
166006
|
166007
|
166008
|
166009