Bugzilla – Attachment 28659 Details for
Bug 5144
Duplicate holds allowed if patron clicks back button after placing hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5144 [2] - Duplicate holds allowed if patron clicks back button after placing hold
Bug-5144-2---Duplicate-holds-allowed-if-patron-cli.patch (text/plain), 1.63 KB, created by
Kyle M Hall (khall)
on 2014-06-04 14:55:44 UTC
(
hide
)
Description:
Bug 5144 [2] - Duplicate holds allowed if patron clicks back button after placing hold
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-06-04 14:55:44 UTC
Size:
1.63 KB
patch
obsolete
>From 4942b60ce331314e3ec334e4c306d719409205ef Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 4 Jun 2014 10:48:02 -0400 >Subject: [PATCH] Bug 5144 [2] - Duplicate holds allowed if patron clicks back button after placing hold > >Koha is currently not engineered to handle multiple holds per record. >Until such time that is does, we should not allow them to be created. > >Test Plan: >1) Apply the first patch in this series >2) Run t/db_dependent/Reserves.t >3) Note the failure of test 36 >4) Apply the second patch in this series >5) Re-run Reserves.t >6) Note the success of test 36 >--- > C4/Reserves.pm | 12 ++++++++++++ > 1 files changed, 12 insertions(+), 0 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index d399ee0..b342c61 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -40,6 +40,7 @@ use C4::Dates qw( format_date_in_iso ); > use Koha::DateUtils; > > use List::MoreUtils qw( firstidx ); >+use Carp; > > use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > >@@ -149,6 +150,17 @@ sub AddReserve { > $constraint, $bibitems, $priority, $resdate, $expdate, $notes, > $title, $checkitem, $found > ) = @_; >+ >+ my ($count) = C4::Context->dbh->selectrow_array( >+ 'SELECT COUNT(*) FROM reserves WHERE biblionumber = ? AND borrowernumber = ?', >+ undef, >+ ( $biblionumber, $borrowernumber ) >+ ); >+ if ( $count > 0 ) { >+ carp("AddReserve: borrower $borrowernumber already has $count holds for biblionumber $biblionumber"); >+ return; >+ } >+ > my $fee = > GetReserveFee($borrowernumber, $biblionumber, $constraint, > $bibitems ); >-- >1.7.2.5
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 5144
:
28657
|
28658
|
28659
|
34983
|
34984
|
34985
|
34986
|
34987
|
34988
|
35090
|
35091
|
35092
|
35093
|
35451
|
40823
|
40824
|
42530
|
42792
|
42848
|
43118
|
43119
|
43120
|
43121
|
43122
|
43125
|
43126
|
43164
|
43165
|
43166
|
43167