Description
Hammat wele
2024-03-29 21:14:48 UTC
Created attachment 164153 [details] [review] 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 Created attachment 164155 [details] [review] 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 Created attachment 164156 [details] [review] Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table Created attachment 164254 [details] [review] 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> Created attachment 164255 [details] [review] Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 164306 [details] [review] 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> Created attachment 164307 [details] [review] 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> Created attachment 166601 [details] [review] 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> Created attachment 166602 [details] [review] 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> 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 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. 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? |