Summary: | Quote of the day feature not selecting random quotes | ||
---|---|---|---|
Product: | Koha | Reporter: | David Noe <drnoe> |
Component: | OPAC | Assignee: | Kyle M Hall (khall) <kyle> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | minor | ||
Priority: | P5 - low | CC: | bgkriegel, gmcharlt, kyle, m.de.rooy, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 10463 - Quote of the day feature not selecting random quotes
[SIGNED-OFF] Bug 10463 - Quote of the day feature not selecting random quotes Bug 10463 - Quote of the day feature not selecting random quotes |
Description
David Noe
2013-06-13 13:37:20 UTC
Created attachment 18940 [details] [review] Bug 10463 - Quote of the day feature not selecting random quotes When the Quote of the Day tool selects a new new quote, it updates the timestamp and does not take the timezone into account. Thus the time is set to +4 hours (e.g. 2013-06-11 13:33:48 when the time is 2013-06-11 09:33:48). It then repeats the same quote every day. To replicate: set Administration >> System preferences >> OPAC preferences >> Features >> QuoteOfTheDay to Enable In Home >> Tools >> Quote Editor, add several quotes. In the opac, refresh the home page. You should get a quote of the day at the top. mysql> select * from quotes; note the timestamp of the quote selected by the tool. It will not match the date on the machine. If you change the date to the previous date and refresh the opac, the tool wlill select another quote, which will not change unless forced. Test Plan: 1) Remove all your quotes and import a fresh set 2) Enable the quote of the day and view the opac 3) Look at your quotes table and note the timestamp is incorrect 4) Repeat steps 1 and 2 5) Look at your quotes table and note the timestamp is now correct Created attachment 19711 [details] [review] [SIGNED-OFF] Bug 10463 - Quote of the day feature not selecting random quotes When the Quote of the Day tool selects a new new quote, it updates the timestamp and does not take the timezone into account. Thus the time is set to +4 hours (e.g. 2013-06-11 13:33:48 when the time is 2013-06-11 09:33:48). It then repeats the same quote every day. To replicate: set Administration >> System preferences >> OPAC preferences >> Features >> QuoteOfTheDay to Enable In Home >> Tools >> Quote Editor, add several quotes. In the opac, refresh the home page. You should get a quote of the day at the top. mysql> select * from quotes; note the timestamp of the quote selected by the tool. It will not match the date on the machine. If you change the date to the previous date and refresh the opac, the tool wlill select another quote, which will not change unless forced. Test Plan: 1) Remove all your quotes and import a fresh set 2) Enable the quote of the day and view the opac 3) Look at your quotes table and note the timestamp is incorrect 4) Repeat steps 1 and 2 5) Look at your quotes table and note the timestamp is now correct Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Created attachment 19947 [details] [review] Bug 10463 - Quote of the day feature not selecting random quotes When the Quote of the Day tool selects a new new quote, it updates the timestamp and does not take the timezone into account. Thus the time is set to +4 hours (e.g. 2013-06-11 13:33:48 when the time is 2013-06-11 09:33:48). It then repeats the same quote every day. To replicate: set Administration >> System preferences >> OPAC preferences >> Features >> QuoteOfTheDay to Enable In Home >> Tools >> Quote Editor, add several quotes. In the opac, refresh the home page. You should get a quote of the day at the top. mysql> select * from quotes; note the timestamp of the quote selected by the tool. It will not match the date on the machine. If you change the date to the previous date and refresh the opac, the tool wlill select another quote, which will not change unless forced. Test Plan: 1) Remove all your quotes and import a fresh set 2) Enable the quote of the day and view the opac 3) Look at your quotes table and note the timestamp is incorrect 4) Repeat steps 1 and 2 5) Look at your quotes table and note the timestamp is now correct Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> QA Comment: Looks good to me. No koha-qa complaints.. Not blocking this patch, but just wondering why we are continuously updating the timestamp of the selected quote for everyone hitting the opac. We do not need a timestamp here, but just a date. And only the first user of the day should trigger a table update. After that no updates are needed for the rest of the day.. Passed QA (In reply to M. de Rooy from comment #4) > Not blocking this patch, but just wondering why we are continuously updating > the timestamp of the selected quote for everyone hitting the opac. We do not > need a timestamp here, but just a date. And only the first user of the day > should trigger a table update. After that no updates are needed for the rest > of the day.. This is not a correct observation however. So just ignore it.. Pushed to master. Thanks, Kyle! This patch has been pushed to 3.12.x, will be in 3.12.4. Thanks Kyle! Pushed to 3.10.x, will be in 3.10.11 |