[Bug 36466] New: Incorrect date value stored when "Published on" or "Expected on" are empty
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Bug ID: 36466 Summary: Incorrect date value stored when "Published on" or "Expected on" are empty Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: hammat.wele@inlibro.com QA Contact: testopia@bugs.koha-community.org When we edit a serial and we leave the date fields ("Published on" or "Expected on") empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |hammat.wele@inlibro.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #1 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 164153 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164153&action=edit Bug 33039: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 8. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have today date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164153|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #2 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 164155 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164155&action=edit Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 8. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have today date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> 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=36466 --- Comment #3 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 164156 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164156&action=edit Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36488 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164155|0 |1 is obsolete| | Attachment #164156|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 164254 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164254&action=edit Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 8. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have today date Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 164255 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164255&action=edit Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Maude <maude.boudreau@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maude.boudreau@collecto.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164254|0 |1 is obsolete| | CC| |emmi.takkinen@koha-suomi.fi --- Comment #6 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 164306 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164306&action=edit Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 8. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have today date Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164255|0 |1 is obsolete| | --- Comment #7 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 164307 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164307&action=edit Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164306|0 |1 is obsolete| | Attachment #164307|0 |1 is obsolete| | --- Comment #8 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 166601 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166601&action=edit Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 8. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have today date Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> 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=36466 --- Comment #9 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 166602 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166602&action=edit Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table WNC amended patch - tidied Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> 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=36466 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal CC| |nick@bywatersolutions.com Status|Signed Off |Passed QA --- Comment #10 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Moving from enhancement Passing QA, but leaving a question for RM: The atomicupdate sets the dates to NULL, which is valid The code now sets blank dates to TODAY - is this correct? Or should it just be NULL? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am really interested in this one since we have been seeing issues with dates in subscriptions ourselves since the last update (flatpickr), but I need a little bit longer to test here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_11_candidate, | |rel_23_05_candidate, | |rel_23_11_candidate, | |rel_24_05_candidate Status|Passed QA |Failed QA --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I can confirm that we have been seeing these issues especially with "irregular" patterns where the next issue date is empty and should be empty in 22.11. We have quite an issue there right now as libraries are forced to set the "next issue publication" date to work around the error 500. (In reply to Nick Clemens (kidclamp) from comment #10)
Moving from enhancement
Passing QA, but leaving a question for RM: The atomicupdate sets the dates to NULL, which is valid The code now sets blank dates to TODAY - is this correct? Or should it just be NULL?
I believe at least for the irregular patterns this doesn't feel correct. We want to have the published and expected dates as NULL for these. The database update looks correct to me. Could we get a tiny follow-up here if you agree? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_24_05_candidate | CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166601|0 |1 is obsolete| | --- Comment #13 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 186057 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186057&action=edit Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 8. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have today date Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> 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=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166602|0 |1 is obsolete| | --- Comment #14 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 186058 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186058&action=edit Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table WNC amended patch - tidied Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> 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=36466 --- Comment #15 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 187282 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187282&action=edit Bug 36466: (follow-up) Use NULL for blank planned and published dates instead of today -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaela.sieber@kit.edu Status|Needs Signoff |Patch doesn't apply --- Comment #16 from Michaela Sieber <michaela.sieber@kit.edu> --- Patches tested and it seems something has changed in main. If I follow the test plan I still get the Error 500 page after deletion of «Published on» and « Expected on dates and save Button on «Edit serials» form. BUT: if I do an SQL select to check the value of both fields in the database They do not have a «0000-00-00» value And it is still possible to go back to the subscription and edit the serials. So still a bug, but not that worse any more ;-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186057|0 |1 is obsolete| | --- Comment #17 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189704 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189704&action=edit Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 9. run ./installer/data/mysql/updatedatabase.pl 8. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have NULL as value -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186058|0 |1 is obsolete| | --- Comment #18 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189705&action=edit Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table WNC amended patch - tidied Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> 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=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187282|0 |1 is obsolete| | --- Comment #19 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189706 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189706&action=edit Bug 36466: (follow-up) Use NULL for blank planned and published dates instead of today -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189704|0 |1 is obsolete| | --- Comment #20 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189707&action=edit Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 8. run ./installer/data/mysql/updatedatabase.pl 9. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have NULL as value -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189705|0 |1 is obsolete| | --- Comment #21 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189708&action=edit Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table WNC amended patch - tidied Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> 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=36466 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189706|0 |1 is obsolete| | --- Comment #22 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189709 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189709&action=edit Bug 36466: (follow-up) Use NULL for blank planned and published dates instead of today -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189707|0 |1 is obsolete| | --- Comment #23 from David Nind <david@davidnind.com> --- Created attachment 190807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190807&action=edit Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 8. run ./installer/data/mysql/updatedatabase.pl 9. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have NULL as value Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189708|0 |1 is obsolete| | --- Comment #24 from David Nind <david@davidnind.com> --- Created attachment 190808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190808&action=edit Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table WNC amended patch - tidied Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189709|0 |1 is obsolete| | --- Comment #25 from David Nind <david@davidnind.com> --- Created attachment 190809 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190809&action=edit Bug 36466: (follow-up) Use NULL for blank planned and published dates instead of today Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |Editing a serial and release notes| |removing the dates in the | |"Published on" and | |"Expected on" fields | |generated a 500 error | |(Serials > [selected | |serial] > Serial | |collection). | | | |This fixes the error and: | |- Sets the data in the | |database to NULL | |- Shows the dates as | |"Unknown" in the serial | |collection table for the | |"Date published" and "Date | |received" columns | |- Changes any existing | |0000-00-00 dates in the | |database to NULL (for | |existing installations) CC| |david@davidnind.com --- Comment #26 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. As in comment #16, on main if you edit a serial and clear the dates you get the 500 error. But the date fields in the database are not changed, and are not set to 0000-00-00 as described in the test plan. 2. With the patches, there is no longer an error and the dates are set to NULL in the database. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Kyle M Hall (khall) <kyle@bywatersolutions.com> 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=36466 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190807|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190808|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190809|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #27 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192624&action=edit Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00 instade of current date and we get Error 500 to reproduce 1. Connect to staff interface 2. Go to Serials and create a new subscription 3. Click on Serial collection in the left menu (and note the Subscription numnber) 4. Select a serial to edit and Click on «Edit serials» 5. In the Serial edition form, delete «Published on > and « Expected on » dates and save ----> Error 500 page is displayed 6. Check the value of «Published on > and « Expected on » dates in the database select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>; ------> planneddate publisheddate have «0000-00-00» value 7. Apply the patch 8. run ./installer/data/mysql/updatedatabase.pl 9. repeat step 2, 3, 4, 5, 6 -----> Error 500 page is no more displayed -----> «Published on » and « Expected on » field have NULL as value Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #28 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192625 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192625&action=edit Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table WNC amended patch - tidied Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #29 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192626&action=edit Bug 36466: (follow-up) Use NULL for blank planned and published dates instead of today Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #30 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adolfo.rodriguez@xercode.es --- Comment #31 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- In a virtual machine running mysql Ver 8.0.31 for Linux on x86_64 (MySQL Community Server - GPL) I had to change the file installer/data/mysql/db_revs/251200019.pl to make it work. This is the version that worked for me: $dbh->do(q{update serial set planneddate=null where year(planneddate) ='0000';}); $dbh->do(q{update serial set publisheddate=null where year(publisheddate)='0000';}); With the file as it is I got the error: ERROR 1292 (22007): Incorrect date value: '0000-00-00' for column 'planneddate' at row 1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #32 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think I have seen that before - might depend on dbms version or if mysql_strict is used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #33 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00,25.11.03 |26.05.00,25.11.03,25.05.09 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #34 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.05.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #35 from Jonathan Druart <jonathan.druart@gmail.com> --- This is wrong, we should not longer fix the 0000-00-00 dates There is this maintenance script that must be used instead (to catch and fix): misc/maintenance/fix_invalid_dates.pl See bug 31143. This should be revert, it causes error on upgrade: ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Incorrect DATE value: '0000-00-00' at /usr/share/koha/lib/C4/Installer.pm line 825 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #36 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #35)
This is wrong, we should not longer fix the 0000-00-00 dates
There is this maintenance script that must be used instead (to catch and fix): misc/maintenance/fix_invalid_dates.pl
See bug 31143.
This should be revert, it causes error on upgrade: ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Incorrect DATE value: '0000-00-00' at /usr/share/koha/lib/C4/Installer.pm line 825
Sorry, I have read too fast. It's not caused by an external script or manually messing with the DB, but an incorrect data generated by Koha itself. In that case it may make sense to fix the data in a db rev. However it fails on some DBMS, please see the following trick to make it work: commit 36a387db22b43f0e8302eea42e3d279f28d7c076 Bug 36822: (follow-up) Catch MySQL 8 failure in update -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com --- Comment #37 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Not backporting to 24.11.x while no fix is provided -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42412 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42412 [Bug 42412] Upgrade to 25.11.02.004 with MySQL 8.4.7 (on ubuntu 24.04.4) fails with Exception: Incorrect DATE value: value: '0000-00-00' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | CC| |pedro.amorim@openfifth.co.u | |k --- Comment #38 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Hi all, removing the additional_work_needed here. If there is a fix required, please log a separate bug with clear instructions on how to reproduce the upgrade issue. Thank you. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 --- Comment #39 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Pedro Amorim (ammopt) from comment #38)
Hi all, removing the additional_work_needed here. If there is a fix required, please log a separate bug with clear instructions on how to reproduce the upgrade issue. Thank you.
It's been fixed on bug 42412. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #40 from Fridolin Somers <fridolin.somers@biblibre.com> --- OK great. I prefer not impact 24.11 LTS to keep it very stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36466 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #41 from David Nind <david@davidnind.com> --- Bug fix, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org