[Koha-bugs] [Bug 16371] Quote of the Day (QOTD) for the staff interface

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Aug 11 10:31:18 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16371

--- Comment #68 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Emmi Takkinen from comment #67)
> (In reply to Jonathan Druart from comment #66)
> 
> > 2. There are still occurrences of GetDailyQuote in t/db_dependent/Koha.t
> > (the tests are failing)
> > 
> Didn't notice these until now. But looking them now it seems they work
> exactly like tests in Quotes.t. Could these be removed at this point?

Yes sure.

> > 5. You are adding raw SQL queries in Koha namespace, that is not needed.
> > 
> > 6. After 5, DateTime::Format::MySQL become useless
> > 
> Sorry for being dense, but I'm failing to see what queries you mean.

Looks like I forgot to review with the last patch!

Then 5 is not valid anymore, however:
 70                 timestamp => { -like => "$dt%" },

This is a bit unusual to me, but I cannot think of something else (apart from
using \'CAST() that is not better). I will ask a couple of QAers how we should
do that.

 94         # update the timestamp for that quote
 95         my $dt =
DateTime::Format::MySQL->format_datetime(dt_from_string());
 96         $quote->update({ timestamp => $dt });

You should not use DateTime::Format::MySQL directly. If you need to use a date
in a search you should use $dtf->format_date[time] instead

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list