Bugzilla – Attachment 102456 Details for
Bug 24800
Koha does incomplete checkin when no return date is provided
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24800: Handle inexistent return date on self checking
Bug-24800-Handle-inexistent-return-date-on-self-ch.patch (text/plain), 2.29 KB, created by
Katrin Fischer
on 2020-04-06 14:50:25 UTC
(
hide
)
Description:
Bug 24800: Handle inexistent return date on self checking
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-04-06 14:50:25 UTC
Size:
2.29 KB
patch
obsolete
>From 26f120d68b78685c33adaa6b47e68968364d84b2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 11 Mar 2020 13:01:52 +0100 >Subject: [PATCH] Bug 24800: Handle inexistent return date on self checking > >See bug 24800 comment 0 for a description of the problem. > >We do not want the SIP server to crash if it receives a checkin request >with a return date that is not given. > >The option this patch chose is to parse it only if provided. > >Signed-off-by: Clemens Elmlinger <clemens.elmlinger@bsz-bw.de> >--- > C4/SIP/ILS/Transaction/Checkin.pm | 27 +++++++++++++++------------ > 1 file changed, 15 insertions(+), 12 deletions(-) > >diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm >index ac92fa6c50..10cd87b5ad 100644 >--- a/C4/SIP/ILS/Transaction/Checkin.pm >+++ b/C4/SIP/ILS/Transaction/Checkin.pm >@@ -56,20 +56,23 @@ sub do_checkin { > } > my $barcode = $self->{item}->id; > >- $return_date = substr( $return_date, 0, 4 ) >- . '-' >- . substr( $return_date, 4, 2 ) >- . '-' >- . substr( $return_date, 6, 2 ) >- . q{ } >- . substr( $return_date, 12, 2 ) >- . ':' >- . substr( $return_date, 14, 2 ) >- . ':' >- . substr( $return_date, 16, 2 ); >+ if ( $return_date ) { >+ $return_date = substr( $return_date, 0, 4 ) >+ . '-' >+ . substr( $return_date, 4, 2 ) >+ . '-' >+ . substr( $return_date, 6, 2 ) >+ . q{ } >+ . substr( $return_date, 12, 2 ) >+ . ':' >+ . substr( $return_date, 14, 2 ) >+ . ':' >+ . substr( $return_date, 16, 2 ); >+ $return_date = dt_from_string($return_date); >+ } > > $debug and warn "do_checkin() calling AddReturn($barcode, $branch)"; >- my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, dt_from_string($return_date)); >+ my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, $return_date); > > if ( $checked_in_ok ) { > delete $messages->{ItemLocationUpdated}; >-- >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 24800
:
100549
|
100550
|
102452
|
102455
|
102456
|
102613
|
102614
|
102615
|
102616
|
102690
|
102691
|
104348