Bugzilla – Attachment 61280 Details for
Bug 7534
Add an option on library level to indicate if a library can be chosen as pick-up location
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7534: Check hold availability to desired pickup location in opac-reserve.pl
Bug-7534-Check-hold-availability-to-desired-pickup.patch (text/plain), 3.29 KB, created by
Biblibre Sandboxes
on 2017-03-20 11:40:06 UTC
(
hide
)
Description:
Bug 7534: Check hold availability to desired pickup location in opac-reserve.pl
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2017-03-20 11:40:06 UTC
Size:
3.29 KB
patch
obsolete
>From 12cfc29f15413f8b819c278e87030cad8699c6ff Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Tue, 7 Feb 2017 17:53:52 +0200 >Subject: [PATCH] Bug 7534: Check hold availability to desired pickup location > in opac-reserve.pl > >To test: >-1. Have access to your browser's developer tools in order to modify <select> > dropdown values >1. Go to cgi-bin/koha/admin/branches.pl >2. Configure one of your libraries to "Pickup location" => "No". Remember the > branchcode of this library! >3. Go place a hold in OPAC >4. See the provided "Pick up location" list >5. Observe the library that you configured is not present in the list >6. You should see another library selected by default. Right click that and > in Firefox/Chrome click "Inspect element" >7. You should see a list of <option value="xxxx">blabla</option> elements >8. Double click between value (xxxx in above example) and replace the value > with the branchcode you remember from step 2. >9. Place the hold >10. Observe that you are taken to cgi-bin/koha/opac-user.pl but your hold > was not successful. >11. Go back to place a hold and this time do not modify any values. >12. Observe that a hold is now placed. > >Signed-off-by: Koha Team AMU <axelle.clarisse@univ-amu.fr> >--- > opac/opac-reserve.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index e304066..c5c8fe5 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -264,7 +264,7 @@ if ( $query->param('place_reserve') ) { > # holdingbranch, force the value $rank and $found. > my $rank = $biblioData->{rank}; > if ( $itemNum ne '' ) { >- $canreserve = 1 if CanItemBeReserved( $borrowernumber, $itemNum ) eq 'OK'; >+ $canreserve = 1 if CanItemBeReserved( $borrowernumber, $itemNum, $branch ) eq 'OK'; > $rank = '0' unless C4::Context->preference('ReservesNeedReturns'); > my $item = GetItem($itemNum); > if ( $item->{'holdingbranch'} eq $branch ) { >@@ -273,7 +273,7 @@ if ( $query->param('place_reserve') ) { > } > } > else { >- $canreserve = 1 if CanBookBeReserved( $borrowernumber, $biblioNum ) eq 'OK'; >+ $canreserve = 1 if CanBookBeReserved( $borrowernumber, $biblioNum, $branch ) eq 'OK'; > > # Inserts a null into the 'itemnumber' field of 'reserves' table. > $itemNum = undef; >@@ -529,7 +529,7 @@ foreach my $biblioNum (@biblionumbers) { > my $policy_holdallowed = !$itemLoopIter->{already_reserved}; > $policy_holdallowed &&= > IsAvailableForItemLevelRequest($itemInfo,$borr) && >- CanItemBeReserved($borrowernumber,$itemNum) eq 'OK'; >+ CanItemBeReserved($borrowernumber,$itemNum,$branch) eq 'OK'; > > if ($policy_holdallowed) { > if ( my $hold_allowed = OPACItemHoldsAllowed( $itemInfo, $borr ) ) { >@@ -588,7 +588,7 @@ foreach my $biblioNum (@biblionumbers) { > } > } > >- $biblioLoopIter{holdable} &&= CanBookBeReserved($borrowernumber,$biblioNum) eq 'OK'; >+ $biblioLoopIter{holdable} &&= CanBookBeReserved($borrowernumber,$biblioNum,$branch) eq 'OK'; > > # For multiple holds per record, if a patron has previously placed a hold, > # the patron can only place more holds of the same type. That is, if the >-- >2.7.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 7534
:
60014
|
60015
|
60016
|
60017
|
60018
|
60022
|
60023
|
60781
|
60794
|
60795
|
60796
|
60797
|
60798
|
60799
|
60878
|
60879
|
60880
|
60881
|
60882
|
60883
|
61044
|
61045
|
61046
|
61047
|
61273
|
61274
|
61275
|
61276
|
61277
|
61278
|
61279
|
61280
|
77847
|
77848
|
77849
|
77850
|
77851
|
77852
|
77853
|
77854
|
77855
|
77856
|
78160
|
78161
|
78162
|
78163
|
78164
|
78165
|
78166
|
78167
|
78168
|
78169
|
78170
|
78171
|
78477
|
78478
|
78479
|
78480
|
78481
|
78482
|
78483
|
78484
|
78485
|
78486
|
78487
|
78488
|
78489
|
78495
|
78540
|
78548
|
84852