Bugzilla – Attachment 100550 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.22 KB, created by
Jonathan Druart
on 2020-03-11 12:12:11 UTC
(
hide
)
Description:
Bug 24800: Handle inexistent return date on self checking
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-11 12:12:11 UTC
Size:
2.22 KB
patch
obsolete
>From a66649cbe43576080c0774e3f0940ddaf821d5c9 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. >--- > 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 f0e8bbdf49..40dee0ccc5 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->{NotIssued}; >-- >2.20.1
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