http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11279
Jonathan Druart <jonathan.dru...@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23663|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.dru...@biblibre.com> --- Created attachment 23669 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23669&action=edit Bug 11279: Improve how a new quote of the day is selected If there is a gap in the id sequence for the quotes table, it is possible that no new quote will be selected. This will happen particularly when a lot of the older quotes with low ids have been deleted. This patch improves the selection of a new quote. To test: - Load sample quotes - Delete the first half of the quotes. Note: With 34 quotes, delete the quotes with ids from 1-17 - Activate the QuoteOfTheDay system preference - Check if a quote is displayed in OPAC - Reload the page a few times, no quote should be displayed Note: make sure you don't have a quote with the current date in your quotes table before running those tests - Run 'perl t/db_dependent/Koha.t' Note: requires sample quotes! - Apply patch - Reload the OPAC start page - Verify a quote was now picked - Run 'perl t/db/dependent/Koha.t' again - all tests should still pass Signed-off-by: Galen Charlton <g...@esilibrary.com> Patch modified to use "LIMIT 1 OFFSET ?" rather than "LIMIT ?, 1"; the latter construction does not work in PostgreSQL. Signed-off-by: Jonathan Druart <jonathan.dru...@biblibre.com> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/