Bugzilla – Attachment 100165 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]
Bug 23531: fix ILSDI non-implemented but documented parameters
Bug-23531-fix-ILSDI-non-implemented-but-documented.patch (text/plain), 6.93 KB, created by
Arthur Suzuki
on 2020-03-05 07:50:41 UTC
(
hide
)
Description:
Bug 23531: fix ILSDI non-implemented but documented parameters
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2020-03-05 07:50:41 UTC
Size:
6.93 KB
patch
obsolete
>From 88ef51f4b6871f117529244172acbfa0c158bd9e 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] Bug 23531: fix ILSDI non-implemented but documented > parameters > >test plan : >1/ Submit a hold through ILSDI with start_date and 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. > >Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com> > >Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> >--- > C4/ILSDI/Services.pm | 36 ++++++++++++++----- > .../opac-tmpl/bootstrap/en/modules/ilsdi.tt | 8 ++--- > opac/ilsdi.pl | 4 +-- > 3 files changed, 34 insertions(+), 14 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 43935bbf8f..8f424cf63d 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -660,9 +660,9 @@ Parameters: > IP address where the end user request is being placed > - pickup_location (Optional) > a branch code indicating the location to which to deliver the item for pickup >- - needed_before_date (Optional) >- date after which hold request is no longer needed >- - pickup_expiry_date (Optional) >+ - start_date (Optional) >+ date after which hold request is no longer needed if the document has not been made available >+ - expiry_date (Optional) > date after which item returned to shelf if item is not picked up > > =cut >@@ -712,12 +712,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('start_date') ) { >+ $resdate = $cgi->param('start_date'); >+ } >+ >+ my $expdate; >+ if ( $cgi->param('expiry_date') ) { >+ $expdate = $cgi->param('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; >@@ -745,9 +755,9 @@ Parameters: > an itemnumber > - pickup_location (Optional) > a branch code indicating the location to which to deliver the item for pickup >- - needed_before_date (Optional) >- date after which hold request is no longer needed >- - pickup_expiry_date (Optional) >+ - start_date (Optional) >+ date after which hold request is no longer needed if the item has not been made available >+ - expiry_date (Optional) > date after which item returned to shelf if item is not picked up > > =cut >@@ -788,12 +798,22 @@ sub HoldItem { > my $canitembereserved = C4::Reserves::CanItemBeReserved( $borrowernumber, $itemnumber, $branch )->{status}; > return { code => $canitembereserved } unless $canitembereserved eq 'OK'; > >+ my $resdate; >+ if ( $cgi->param('start_date') ) { >+ $resdate = $cgi->param('start_date'); >+ } >+ >+ my $expdate; >+ if ( $cgi->param('expiry_date') ) { >+ $expdate = $cgi->param('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; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt >index 7c882d4b3b..361f366d36 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt >@@ -713,9 +713,9 @@ > <dd>IP address where the end user request is being placed</dd> > <dt><strong>pickup_location</strong> (Optional)</dt> > <dd>an identifier indicating the location to which to deliver the item for pickup</dd> >- <dt><strong>needed_before_date</strong> (Optional)</dt> >+ <dt><strong>start_date</strong> (Optional)</dt> > <dd>date after which hold request is no longer needed</dd> >- <dt><strong>pickup_expiry_date</strong> (Optional)</dt> >+ <dt><strong>expiry_date</strong> (Optional)</dt> > <dd>date after which item returned to shelf if item is not picked up</dd> > </dl> > <h4>Example Call</h4> >@@ -744,9 +744,9 @@ > <dd>the ILS identifier for the specific item on which the request is placed</dd> > <dt><strong>pickup_location</strong> (Optional)</dt> > <dd>an identifier indicating the location to which to deliver the item for pickup</dd> >- <dt><strong>needed_before_date</strong> (Optional)</dt> >+ <dt><strong>start_date</strong> (Optional)</dt> > <dd>date after which hold request is no longer needed</dd> >- <dt><strong>pickup_expiry_date</strong> (Optional)</dt> >+ <dt><strong>expiry_date</strong> (Optional)</dt> > <dd>date after which item returned to shelf if item is not picked up</dd> > </dl> > <h4>Example Call</h4> >diff --git a/opac/ilsdi.pl b/opac/ilsdi.pl >index 290abad758..03fa4f78a7 100755 >--- a/opac/ilsdi.pl >+++ b/opac/ilsdi.pl >@@ -108,8 +108,8 @@ my %optional = ( > 'GetPatronStatus' => [], > 'GetServices' => [], > 'RenewLoan' => ['desired_due_date'], >- 'HoldTitle' => [ 'pickup_location', 'needed_before_date', 'pickup_expiry_date' ], >- 'HoldItem' => [ 'pickup_location', 'needed_before_date', 'pickup_expiry_date' ], >+ 'HoldTitle' => [ 'pickup_location', 'start_date', 'expiry_date' ], >+ 'HoldItem' => [ 'pickup_location', 'start_date', 'expiry_date' ], > 'CancelHold' => [], > ); > >-- >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