Bugzilla – Attachment 94383 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.23 KB, created by
Katrin Fischer
on 2019-10-18 06:22:31 UTC
(
hide
)
Description:
Bug 22922: Allow to modify hold dates on reserve/request.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-10-18 06:22:31 UTC
Size:
4.23 KB
patch
obsolete
>From 013e684705fbc5b17bf6da1a79f7a1bd85475926 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 > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > 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 2a77c3dc5b..8f14b293e1 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -906,6 +906,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'}; >@@ -937,6 +939,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 c40d3e638b..77c49e1fbe 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 c7832434a3..c5014820f6 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -661,9 +661,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.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 22922
:
89824
|
89896
|
89902
|
89915
|
89916
|
89917
|
94372
| 94383 |
94384
|
94385
|
94386