Bugzilla – Attachment 67116 Details for
Bug 19298
allow_onshelf_holds is not calculated correctly in opac-shelves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19298: Placing a hold from a list at the OPAC should respect issuing rules
Bug-19298-Placing-a-hold-from-a-list-at-the-OPAC-s.patch (text/plain), 2.24 KB, created by
Jonathan Druart
on 2017-09-13 18:43:53 UTC
(
hide
)
Description:
Bug 19298: Placing a hold from a list at the OPAC should respect issuing rules
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-09-13 18:43:53 UTC
Size:
2.24 KB
patch
obsolete
>From 8a4157ba23f7fe4d910d5a9cebbd454975d02c63 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 12 Sep 2017 13:03:04 -0300 >Subject: [PATCH] Bug 19298: Placing a hold from a list at the OPAC should > respect issuing rules > >The issuing rule retrieve to know if a hold can be placed on a record of >a list is not correct. > >Test plan: >0/ With item-level_itypes = item level >1/ Define a item.itype=BK and biblioitems.itemtype=CF >2/ Create a default rule to allow on shelf holds >3/ Create a specific rule for CF with on shelf holds="If any >unavailable" >4/ Add this bibliographic record to a list and view the list >=> Without this patch you will not see "Place hold" >=> With this patch applied you will see the "Place hold" button, >respecting the correct issuing rule >--- > opac/opac-shelves.pl | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index e5b9cc62a1..1feaf57cae 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -29,6 +29,7 @@ use C4::Output; > use C4::Tags qw( get_tags ); > use C4::XSLT; > >+use Koha::Biblios; > use Koha::Biblioitems; > use Koha::Items; > use Koha::ItemTypes; >@@ -272,6 +273,7 @@ if ( $op eq 'view' ) { > my $this_item = GetBiblioData($biblionumber); > my $record = GetMarcBiblio({ biblionumber => $biblionumber }); > my $framework = GetFrameworkCode( $biblionumber ); >+ my $biblio = Koha::Biblios->find( $biblionumber ); > $record_processor->options({ > interface => 'opac', > frameworkcode => $framework >@@ -315,8 +317,11 @@ if ( $op eq 'view' ) { > }); > } > >- $this_item->{allow_onshelf_holds} = C4::Reserves::OnShelfHoldsAllowed($this_item, $patron); >- >+ my $items = $biblio->items; >+ while ( my $item = $items->next ) { >+ $this_item->{allow_onshelf_holds} = C4::Reserves::OnShelfHoldsAllowed($item->unblessed, $patron); >+ last if $this_item->{allow_onshelf_holds}; >+ } > > if ( grep {$_ eq $biblionumber} @cart_list) { > $this_item->{incart} = 1; >-- >2.11.0
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 19298
:
67116
|
67387
|
68460
|
68461