Bugzilla – Attachment 92538 Details for
Bug 23531
ILS-DI doesn't implement needed_before_date and pickup_expiry_date parameters (renamed start_date and expiry_date)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug23531 : fix ILSDI non-implemented but documented parameters
bug23531--fix-ILSDI-non-implemented-but-documented.patch (text/plain), 2.83 KB, created by
Arthur Suzuki
on 2019-09-03 09:14:37 UTC
(
hide
)
Description:
bug23531 : fix ILSDI non-implemented but documented parameters
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2019-09-03 09:14:37 UTC
Size:
2.83 KB
patch
obsolete
>From 2e47a2dd571e18bd435068c08a733e4333c6f949 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Tue, 3 Sep 2019 11:08:49 +0200 >Subject: [PATCH] bug23531 : fix ILSDI non-implemented but documented > parameters > >test plan : >1/ Submit a hold through ILSDI with needed_before_date and >pickup_expiry_date parameters >2/ Verify in Koha those parameters are not applied to the newly created >reserve. Delete reserve. >3/ Apply patch and repeat 1. >4/ Verify the reserve created by same request as 1 now has both dates >applied and visible in Koha. >--- > C4/ILSDI/Services.pm | 24 ++++++++++++++++++++++-- > 1 file changed, 22 insertions(+), 2 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 049ddcf600..bc64387542 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -725,12 +725,22 @@ sub HoldTitle { > return { code => 'libraryNotPickupLocation' } unless $destination->pickup_location; > return { code => 'cannotBeTransferred' } unless $biblio->can_be_transferred({ to => $destination }); > >+ my $resdate; >+ if ( $cgi->param('needed_before_date') ) { >+ $resdate = $cgi->param('needed_before_date'); >+ } >+ >+ my $expdate; >+ if ( $cgi->param('pickup_expiry_date') ) { >+ $expdate = $cgi->param('pickup_expiry_date'); >+ } >+ > # Add the reserve > # $branch, $borrowernumber, $biblionumber, > # $constraint, $bibitems, $priority, $resdate, $expdate, $notes, > # $title, $checkitem, $found > my $priority= C4::Reserves::CalculatePriority( $biblionumber ); >- AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, undef, undef, undef, $title, undef, undef ); >+ AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, $resdate, $expdate, undef, $title, undef, undef ); > > # Hashref building > my $out; >@@ -801,12 +811,22 @@ sub HoldItem { > my $canitembereserved = C4::Reserves::CanItemBeReserved( $borrowernumber, $itemnumber, $branch )->{status}; > return { code => $canitembereserved } unless $canitembereserved eq 'OK'; > >+ my $resdate; >+ if ( $cgi->param('needed_before_date') ) { >+ $resdate = $cgi->param('needed_before_date'); >+ } >+ >+ my $expdate; >+ if ( $cgi->param('pickup_expiry_date') ) { >+ $expdate = $cgi->param('pickup_expiry_date'); >+ } >+ > # Add the reserve > # $branch, $borrowernumber, $biblionumber, > # $constraint, $bibitems, $priority, $resdate, $expdate, $notes, > # $title, $checkitem, $found > my $priority= C4::Reserves::CalculatePriority( $biblionumber ); >- AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, undef, undef, undef, $title, $itemnumber, undef ); >+ AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, $resdate, $expdate, undef, $title, $itemnumber, undef ); > > # Hashref building > my $out; >-- >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 23531
:
92538
|
93475
|
96563
|
96564
|
100165
|
100166
|
100221
|
100222
|
100294
|
100295
|
100895
|
100896
|
100897
|
100898