Bugzilla – Attachment 31584 Details for
Bug 12353
Reserves last pickup date needs to respect holidays, and everybody need to know the last pickup date for reserves, even notices.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12353 - Last pickup date in the letter templates
0003-Bug-12353-Last-pickup-date-in-the-letter-templates.patch (text/plain), 2.64 KB, created by
Olli-Antti Kivilahti
on 2014-09-14 10:36:39 UTC
(
hide
)
Description:
Bug 12353 - Last pickup date in the letter templates
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2014-09-14 10:36:39 UTC
Size:
2.64 KB
patch
obsolete
>From eb549930fd7fce771f1cbfa89c8de113725ecccb Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Sun, 14 Sep 2014 12:12:28 +0300 >Subject: [PATCH 3/6] Bug 12353 - Last pickup date in the letter templates >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >TEST PLAN: > >PREPARE THE LETTER: >1. Go to Home ⺠Tools ⺠Notices & Slips. >2. Edit letter template with code HOLD. >3. Add the <<lastpickupdate>> placeholder to different template types. > >SEND AND RECEIVE THE LETTER: >1. Create a reservation for a Borrower with pickup branch. >2. Make sure the borrower receives "Hold waiting for pickup"-notices using the > message _transport_Type on which you added the <<lastpickupdate>> -placeholder. >3. Check-in the corresponding Item in the pickup branch and confirm the hold > for the Borrower >4. Wait for the message to be delivered and observe your <<lastpickupdate>> being > replaced with a date. >--- > C4/Reserves.pm | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 08f452a..b7af359 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1874,6 +1874,8 @@ sub _koha_notify_reserve { > > my $admin_email_address = $branch_details->{'branchemail'} || C4::Context->preference('KohaAdminEmailAddress'); > >+ my $expiration = _reserve_last_pickup_date($reserve); >+ > my %letter_params = ( > module => 'reserves', > branchcode => $reserve->{branchcode}, >@@ -1884,7 +1886,10 @@ sub _koha_notify_reserve { > 'reserves' => $reserve, > 'items', $reserve->{'itemnumber'}, > }, >- substitute => { today => C4::Dates->new()->output() }, >+ substitute => { >+ today => C4::Dates->new()->output(), >+ lastpickupdate => C4::Dates->new($expiration->ymd(), 'iso')->output() >+ }, > ); > > my $notification_sent = 0; #Keeping track if a Hold_filled message is sent. If no message can be sent, then default to a print message. >@@ -2218,6 +2223,8 @@ sub ReserveSlip { > }) or return; > my $reserve = GetReserveInfo($reserve_id) or return; > >+ my $expiration = _reserve_last_pickup_date($reserve); >+ > return C4::Letters::GetPreparedLetter ( > module => 'circulation', > letter_code => $transfer ? 'TRANSFERSLIP' : 'RESERVESLIP', >@@ -2229,6 +2236,9 @@ sub ReserveSlip { > 'biblio' => $reserve->{biblionumber}, > 'items' => $reserve->{itemnumber}, > }, >+ substitute => { >+ lastpickupdate => C4::Dates->new($expiration->ymd(), 'iso')->output() >+ }, > ); > } > >-- >1.7.9.5 >
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 12353
:
31556
|
31572
| 31584 |
31585
|
31586