Bugzilla – Attachment 88236 Details for
Bug 16284
With CheckPrevCheckout used, check only the item for previous checkout if biblio is serial
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16284: Check only item for previous checkout if biblio is serial
Bug-16284-Check-only-item-for-previous-checkout-if.patch (text/plain), 1.66 KB, created by
Michal Denar
on 2019-04-17 19:56:15 UTC
(
hide
)
Description:
Bug 16284: Check only item for previous checkout if biblio is serial
Filename:
MIME Type:
Creator:
Michal Denar
Created:
2019-04-17 19:56:15 UTC
Size:
1.66 KB
patch
obsolete
>From 09a5bf9ec0c19cc8cb337bf7c009152d541aa90e Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Thu, 22 Jun 2017 11:26:53 +0200 >Subject: [PATCH] Bug 16284: Check only item for previous checkout if biblio is > serial > >Test plan: >1) Set 'CheckPrevCheckout' system preference to 'Do' >2) Make a checkout with item from serial record (942$s is 1 on default > settings) >3) Return that checkout >4) Try to check it out again, you should see an alert, that the patron >has thi item checked out previously >5) Try to checkout another item from same bibliographic record, you >sholud not see the alert and item should be checked out >6) prove t/db_dependent/Patron/Borrower_PrevCheckout.t > >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > Koha/Patron.pm | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index c3326285b9..670065f478 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -549,11 +549,13 @@ $PATRON, 0 otherwise. > sub do_check_for_previous_checkout { > my ( $self, $item ) = @_; > >- # Find all items for bib and extract item numbers. >- my @items = Koha::Items->search({biblionumber => $item->{biblionumber}}); > my @item_nos; >- foreach my $item (@items) { >- push @item_nos, $item->itemnumber; >+ my $biblio = Koha::Biblios->find( $item->{biblionumber} ); >+ if ( $biblio->serial ) { >+ push @item_nos, $item->{itemnumber}; >+ } else { >+ # Get all itemnumbers for given bibliographic record. >+ @item_nos = $biblio->items->get_column( 'itemnumber' ); > } > > # Create (old)issues search criteria >-- >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 16284
:
88050
|
88051
|
88236
|
88237
|
88258
|
88259
|
90642
|
90643
|
90644
|
90645
|
90646
|
90647
|
90648
|
90649
|
92130
|
92131
|
92132
|
92133