Bugzilla – Attachment 35453 Details for
Bug 13536
Date due without time on CHECKOUT alert
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13536: Follow-up for adding date_due_without_time in column list
Bug-13536-Follow-up-for-adding-dateduewithouttime-.patch (text/plain), 1.82 KB, created by
Aleisha Amohia
on 2015-01-21 21:24:21 UTC
(
hide
)
Description:
Bug 13536: Follow-up for adding date_due_without_time in column list
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2015-01-21 21:24:21 UTC
Size:
1.82 KB
patch
obsolete
>From 8d0e80bf27f1f52706666cd4b68838d7c6d5fb2c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 21 Jan 2015 14:06:33 +0100 >Subject: [PATCH] Bug 13536: Follow-up for adding date_due_without_time in > column list > >This patch adds the ("virtual") column date_due_without_time to the >list of available columns when editing a notice (for the issues table). > >Test plan: >Add the column to the CHECKOUT notice. >Verify that the actual notice at checkout now contains the expected data. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >I also tested this by adding the field to DUE and running the overdues >cron job. >Note that in that case it must be included in an <item> section. (This >is a restriction imposed by the code in the overdue_notices.pl script.) > >Signed-off-by: Aleisha <aleishaamohia@hotmail.com> >--- > tools/letter.pl | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/tools/letter.pl b/tools/letter.pl >index ab4f78f..9488083 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -430,7 +430,9 @@ sub get_columns_for { > push @fields, { > value => $table_prefix . $row->{Field}, > text => $table_prefix . $row->{Field}, >- } >+ }; >+ push @fields, _add_date_due2($table_prefix) if $table eq 'issues' && >+ $row->{Field} eq 'date_due'; > } > if ($table eq 'borrowers') { > if ( my $attributes = C4::Members::Attributes::GetAttributes() ) { >@@ -444,3 +446,11 @@ sub get_columns_for { > } > return @fields; > } >+ >+sub _add_date_due2 { >+ # This adds a second date due (without time) to the available columns >+ # when editing a notice. See also _parseletter_sth in Letters.pm. >+ my ( $pfx ) = @_; >+ my $str = $pfx . 'date_due_without_time'; >+ return { value => $str, text => $str }; >+} >-- >1.7.10.4
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 13536
:
35033
|
35443
| 35453 |
35507