Bug 12507

Summary: News does not always display in staff or OPAC
Product: Koha Reporter: MetaBiblioteca Colombia <felipe.gomez3>
Component: ToolsAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, katrin.fischer, kyle, mtj, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 12507 - Don't show News in Staff and opac
Bug 12507 - News does not always display in staff or OPAC
[SIGNED-OFF] Bug 12507 - News does not always display in staff or OPAC
[PASSED QA] Bug 12507 - News does not always display in staff or OPAC

Description MetaBiblioteca Colombia 2014-07-01 03:53:31 UTC
In these versions news HOMEPAGE staff and OPAC disappear.
I have the error un the NewsChannels.pm file.
/usr/share/koha/lib/C4/NewsChannels.pm

the error is solved by simply changing the quotes in the line 200:

OLD:
     AND   `timestamp` < CURRENT_DATE()+1
NEW:
     AND   'timestamp' < CURRENT_DATE()+1
Comment 1 Owen Leonard 2014-07-01 12:37:25 UTC
Please paste the error. The news feature works fine for me in the OPAC and staff client in version 3.16.01.
Comment 2 Kyle M Hall 2014-07-31 15:24:18 UTC
I can confirm this bug. There is no error message in the logs!
Comment 3 Kyle M Hall 2014-07-31 15:29:02 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2014-07-31 15:29:56 UTC
I have no idea how to trigger this bug, but the tester can at least prove it does not cause a regression, I think that should be enough!
Comment 5 Kyle M Hall 2014-07-31 15:34:26 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2014-07-31 15:49:24 UTC Comment hidden (obsolete)
Comment 7 MetaBiblioteca Colombia 2014-07-31 16:42:03 UTC
Many Thanks for this patch
Comment 8 Katrin Fischer 2014-08-02 20:43:58 UTC
Created attachment 30499 [details] [review]
[PASSED QA] Bug 12507 - News does not always display in staff or OPAC

News will not display on the last day of each month due to the
way the date is calculated in the SQL code for grabbing news.

Test Plan:
1) Create a news item that should display
2) Change your server's date to the last day of the month
3) Note you can no longer see that news item
4) Apply this patch
5) Note you can now see your news item again

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 9 Katrin Fischer 2014-08-02 20:50:02 UTC
Ideally this should have a regression test, but I am not sure how to pretend a specific date for the test to work as it's using SQL to get the current date.
Comment 10 Tomás Cohen Arazi 2014-08-24 16:36:12 UTC
Patch pushed to master.

Thanks Kyle!
Comment 11 Mason James 2015-04-08 08:46:00 UTC
Pushed to 3.16.x, will be in 3.16.10
Comment 12 Mason James 2015-04-08 08:50:10 UTC
(In reply to Mason James from comment #11)
> Pushed to 3.16.x, will be in 3.16.10

Fridolyn, you might want this for 3.14.x?