Bugzilla – Attachment 35443 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.81 KB, created by
Marcel de Rooy
on 2015-01-21 15:00:24 UTC
(
hide
)
Description:
Bug 13536: Follow-up for adding date_due_without_time in column list
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-01-21 15:00:24 UTC
Size:
1.81 KB
patch
obsolete
>From c94bf2f6698ba2a5c78df40e607660ec75a866c0 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 >Content-Type: text/plain; charset=utf-8 > >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.) >--- > tools/letter.pl | 12 +++++++++++- > 1 files changed, 11 insertions(+), 1 deletions(-) > >diff --git a/tools/letter.pl b/tools/letter.pl >index b806e9b..30e1279 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.7.6
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