Bugzilla – Attachment 52491 Details for
Bug 16534
Error when checking out already checked out item (depending on AllowReturnToBranch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16534: Block AddIssue from issuing if the return is not possible
Bug-16534-Block-AddIssue-from-issuing-if-the-retur.patch (text/plain), 1.41 KB, created by
Kyle M Hall (khall)
on 2016-06-17 16:31:17 UTC
(
hide
)
Description:
Bug 16534: Block AddIssue from issuing if the return is not possible
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-06-17 16:31:17 UTC
Size:
1.41 KB
patch
obsolete
>From 1482609133c0794f2292f7d88a392f0972ccce54 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 22 May 2016 10:01:56 +0100 >Subject: [PATCH] Bug 16534: Block AddIssue from issuing if the return is not > possible >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To make sure the return can be done, AddIssue must not trust callers (they >should have done their job, but we are not sure) and check that the issue can >be returned before issuing to the patron. > >There is no test plan here, this should not be possible from the Koha >interface. >However, looking at the code, it may be possible using SIP. > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Circulation.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index cd3ac70..13caa3f 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1386,6 +1386,8 @@ sub AddIssue { > if ( $actualissue->{borrowernumber}) { > # This book is currently on loan, but not to the person > # who wants to borrow it now. mark it returned before issuing to the new borrower >+ my ( $allowed, $message ) = CanBookBeReturned( $item, C4::Context->userenv->{branch} ); >+ return unless $allowed; > AddReturn( > $item->{'barcode'}, > C4::Context->userenv->{'branch'} >-- >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 16534
:
51687
|
51697
|
51698
|
51699
|
51700
|
51706
|
51707
|
51708
|
51709
|
51710
|
52487
|
52488
|
52489
|
52490
| 52491 |
52492
|
52493