Bugzilla – Attachment 27826 Details for
Bug 12167
datetime type casting issue regarding bug 7567
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12167 - Patch disappearing news problem
Bug-12167---Patch-disappearing-news-problem.patch (text/plain), 1.73 KB, created by
Mark Tompsett
on 2014-05-01 03:17:13 UTC
(
hide
)
Description:
Bug 12167 - Patch disappearing news problem
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-05-01 03:17:13 UTC
Size:
1.73 KB
patch
obsolete
>From af7d91cbfabeec06c361525df7d8a7db466ef84f Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 30 Apr 2014 22:49:45 -0400 >Subject: [PATCH] Bug 12167 - Patch disappearing news problem > >This doesn't duplicate on Debian, but it does under Ubuntu. > >TEST PLAN >--------- >1) Update your git master to current. >2) Log into your staff client. >3) The news may have disappeared. > -- Make sure to have news entered. > The problem portion is the timestamp and date+1 logic > don't seem to function properly. >4) Apply the first patch. >5) prove -v t/db_dependent/NewsChannels.t > -- It should "fail". >6) Apply the second patch. >7) The news should reappear. > -- There is no apparent change under Debian. >8) prove -v t/db_dependent/NewsChannels.t > -- It should now "work". >--- > C4/NewsChannels.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm >index 47772ef..83f4096 100644 >--- a/C4/NewsChannels.pm >+++ b/C4/NewsChannels.pm >@@ -197,13 +197,13 @@ sub GetNewsToDisplay { > OR expirationdate IS NULL > OR expirationdate = '00-00-0000' > ) >- AND `timestamp` < CURRENT_DATE()+1 >+ AND CAST( `timestamp` AS DATE ) <= CURRENT_DATE() > AND (lang = '' OR lang = ?) > AND (branchcode IS NULL OR branchcode = ?) > ORDER BY number > }; # expirationdate field is NOT in ISO format? >- # timestamp has HH:mm:ss, CURRENT_DATE generates 00:00:00 >- # by adding 1, that captures today correctly. >+ # casting timestamp to date truncates HH:mm:ss >+ # changing to <= CURRENT_DATE() today is captured. > my $sth = $dbh->prepare($query); > $lang = $lang // q{}; > $sth->execute($lang,$branch); >-- >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 12167
:
27825
|
27826
|
30171
|
30172
|
30173
|
30174
|
30175
|
30176
|
30599
|
30600
|
30601
|
30642
|
30663
|
30882
|
30883
|
30884
|
30885
|
31139
|
38721
|
38722
|
38723
|
38724