[Bug 16550] New: Can't set opac news expiration date to NULL, it reverts to today
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Bug ID: 16550 Summary: Can't set opac news expiration date to NULL, it reverts to today Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bug 13813 changed koha-news.pl to remove use of C4::Dates However, dt_from_string defaults to today when passed a blank value, so news now must have an expiration date and it defaults to today -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13813 Priority|P5 - low |P3 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13813 [Bug 13813] Remove deprecated module C4::Dates from system - first steps -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 51642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51642&action=edit Bug 16550: Can't set opac news expiration date to NULL, it reverts to today This patch fixes an issue with the expiration dates for news always reverting to today if empty. To test: - Apply patch - Go to Home > Tools > News - Create a news item, do not set expiration date - Verify that expiration date stays empty - Edit this news item - Do not set expiration date - Verify that expiration date stays empty - Do the same with expiration dates - Verify that they are saved properly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 51650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51650&action=edit Bug 16550: Add test to NewsChannels.t To test: Run t/db_dependent/NewsChannels.t Tests adding and retreiving a news item without expiration date. This test should fail without patch for Bug 16550 and pass OK with patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- When editing the news item the date is populated to today's date and must be cleared. It does save as empty, but shouldn't auto-populate Tests pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 --- Comment #4 from Marc Véron <veron@veron.ch> --- Hi Nick, I just re-tested: - Applied both patches - With MySql, emptied table opac_news - Went to Home > Tools > News - New entry, save it without filling in Expiration date Result OK: News has no Expiration date in list - Edit the entry Result OK: In edit form, Expiration date is empty, does not auto-populate - Change title, leave Expiration date empty, save Result OK: News has no Expiration date in list - Edit News, add an expiration date, save Result OK: Expiration date appears in list - Edit News again, remove date from Expiration date, save Result OK: No expiration date in list -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51642|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 51655 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51655&action=edit Bug 16550: Can't set opac news expiration date to NULL, it reverts to today This patch fixes an issue with the expiration dates for news always reverting to today if empty. To test: - Apply patch - Go to Home > Tools > News - Create a news item, do not set expiration date - Verify that expiration date stays empty - Edit this news item - Do not set expiration date - Verify that expiration date stays empty - Do the same with expiration dates - Verify that they are saved properly Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51650|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 51656 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51656&action=edit Bug 16550: Add test to NewsChannels.t To test: Run t/db_dependent/NewsChannels.t Tests adding and retreiving a news item without expiration date. This test should fail without patch for Bug 16550 and pass OK with patch. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51655|0 |1 is obsolete| | Attachment #51656|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51668 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51668&action=edit Bug 16550: Can't set opac news expiration date to NULL, it reverts to today This patch fixes an issue with the expiration dates for news always reverting to today if empty. To test: - Apply patch - Go to Home > Tools > News - Create a news item, do not set expiration date - Verify that expiration date stays empty - Edit this news item - Do not set expiration date - Verify that expiration date stays empty - Do the same with expiration dates - Verify that they are saved properly Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51669 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51669&action=edit Bug 16550: Add test to NewsChannels.t To test: Run t/db_dependent/NewsChannels.t Tests adding and retreiving a news item without expiration date. This test should fail without patch for Bug 16550 and pass OK with patch. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51670 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51670&action=edit Bug 16550: Clean the tests - replace ok with is - remove diag - replace $dbh->prepare->execute->fetchrow with $dbh->selectrow_array And remove unecessary force to scalar context in pl Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.05, thanks Marc, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16550 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- Patches pushed to 3.22.x, will be in 3.22.7 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org