Bugzilla – Attachment 35033 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: Remove time from CHECKOUT notice
Bug-13536-Remove-time-from-CHECKOUT-notice.patch (text/plain), 2.18 KB, created by
Marcel de Rooy
on 2015-01-08 12:02:34 UTC
(
hide
)
Description:
Bug 13536: Remove time from CHECKOUT notice
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-01-08 12:02:34 UTC
Size:
2.18 KB
patch
obsolete
>From 4d387ccfb2f648f4dd24071feed61754c68fb525 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 8 Jan 2015 12:53:49 +0100 >Subject: [PATCH] Bug 13536: Remove time from CHECKOUT notice >Content-Type: text/plain; charset=utf-8 > >In the issues table date_due is a datetime field. >If you do not have hourly loans, the 23:59:00 on the CHECKOUT notice may >be somewhat confusing. (When does the library close?) > >In the patch submitted I virtually add a date_due_without_time column to >the issues table by adding such a field in the SELECT statement in >Letters.pm, routine _parseletter_sth. > >If you want to remove the time from the notice, now you can just edit the >notice and replace <<issues.date_due>> by <<issues.date_due_without_time>>. > >Test plan: >[1] Edit CHECKOUT notice as described above. >[2] Check out a book to a patron (notice enabled in his messaging prefs). >[3] Check the notice: Do you only see the date, not the time? >--- > C4/Letters.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index a11c862..7b400d7 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -731,7 +731,7 @@ sub _parseletter_sth { > ($table eq 'biblio' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : > ($table eq 'biblioitems' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : > ($table eq 'items' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : >- ($table eq 'issues' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : >+ ($table eq 'issues' ) ? "SELECT *, CAST(date_due AS DATE) AS date_due_without_time FROM $table WHERE itemnumber = ?" : > ($table eq 'old_issues' ) ? "SELECT * FROM $table WHERE itemnumber = ? ORDER BY timestamp DESC LIMIT 1" : > ($table eq 'reserves' ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" : > ($table eq 'borrowers' ) ? "SELECT * FROM $table WHERE borrowernumber = ?" : >-- >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