Bugzilla – Attachment 89824 Details for
Bug 22922
Allow to modify hold and hold expiration date in staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22922: Allow to modify hold dates on reserve/request.pl
Bug-22922-Allow-to-modify-hold-dates-on-reservereq.patch (text/plain), 4.12 KB, created by
Julian Maurice
on 2019-05-16 10:14:51 UTC
(
hide
)
Description:
Bug 22922: Allow to modify hold dates on reserve/request.pl
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2019-05-16 10:14:51 UTC
Size:
4.12 KB
patch
obsolete
>From 33fc606e014d6c5a21ac20c87b755dc50d148ba4 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 14 May 2019 16:42:24 +0200 >Subject: [PATCH] Bug 22922: Allow to modify hold dates on reserve/request.pl > >Test plan: >1. Place some holds >2. Go to the 'Holds' tab of the biblio record >3. Modify dates in the table and click on 'Update holds' button >4. Verify that dates have been correctly updated >--- > C4/Reserves.pm | 4 ++++ > koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc | 4 ++-- > reserve/modrequest.pl | 4 ++++ > reserve/request.pl | 5 ++--- > 4 files changed, 12 insertions(+), 5 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 205ed7873a..1a1a543a03 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -908,6 +908,8 @@ sub ModReserve { > > my $rank = $params->{'rank'}; > my $reserve_id = $params->{'reserve_id'}; >+ my $reservedate = $params->{reservedate} || undef; >+ my $expirationdate = $params->{expirationdate} || undef; > my $branchcode = $params->{'branchcode'}; > my $itemnumber = $params->{'itemnumber'}; > my $suspend_until = $params->{'suspend_until'}; >@@ -939,6 +941,8 @@ sub ModReserve { > $hold->set( > { > priority => $rank, >+ reservedate => $reservedate, >+ expirationdate => $expirationdate, > branchcode => $branchcode, > itemnumber => $itemnumber, > found => undef, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index a878658d21..bb4d534ad5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -106,8 +106,8 @@ > </td> > > <td>[% hold.notes | html %]</td> >- <td>[% hold.date | html %]</td> >- <td>[% hold.expirationdate | html %]</td> >+ <td><input type="date" value="[% hold.date | html %]" required name="reservedate"></td> >+ <td><input type="date" value="[% hold.expirationdate | html %]" name="expirationdate"></td> > > <td> > [% IF ( hold.found ) %] >diff --git a/reserve/modrequest.pl b/reserve/modrequest.pl >index 0d1b2d0262..7e2c18919f 100755 >--- a/reserve/modrequest.pl >+++ b/reserve/modrequest.pl >@@ -44,6 +44,8 @@ my @reserve_id = $query->multi_param('reserve_id'); > my @rank = $query->multi_param('rank-request'); > my @biblionumber = $query->multi_param('biblionumber'); > my @borrower = $query->multi_param('borrowernumber'); >+my @reservedates = $query->multi_param('reservedate'); >+my @expirationdates = $query->multi_param('expirationdate'); > my @branch = $query->multi_param('pickup'); > my @itemnumber = $query->multi_param('itemnumber'); > my @suspend_until=$query->multi_param('suspend_until'); >@@ -70,6 +72,8 @@ else { > ModReserve({ > rank => $rank[$i], > reserve_id => $reserve_id[$i], >+ reservedate => $reservedates[$i], >+ expirationdate => $expirationdates[$i], > branchcode => $branch[$i], > itemnumber => $itemnumber[$i], > suspend_until => $suspend_until[$i] >diff --git a/reserve/request.pl b/reserve/request.pl >index f559ed0929..41b61a94ae 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -599,9 +599,8 @@ foreach my $biblionumber (@biblionumbers) { > } > } > >- $reserve{'expirationdate'} = output_pref( { dt => dt_from_string( $res->expirationdate ), dateonly => 1 } ) >- unless ( !defined( $res->expirationdate ) || $res->expirationdate eq '0000-00-00' ); >- $reserve{'date'} = output_pref( { dt => dt_from_string( $res->reservedate ), dateonly => 1 } ); >+ $reserve{'expirationdate'} = $res->expirationdate; >+ $reserve{'date'} = $res->reservedate; > $reserve{'borrowernumber'} = $res->borrowernumber(); > $reserve{'biblionumber'} = $res->biblionumber(); > $reserve{'patron'} = $res->borrower; >-- >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 22922
:
89824
|
89896
|
89902
|
89915
|
89916
|
89917
|
94372
|
94383
|
94384
|
94385
|
94386