Bug 36466 - Incorrect date value stored when "Published on" or "Expected on" are empty
Summary: Incorrect date value stored when "Published on" or "Expected on" are empty
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Hammat wele
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-29 21:14 UTC by Hammat wele
Modified: 2024-04-03 07:20 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 33039: Incorrect date value stored when 'Published on' or 'Expected on' are empty (2.11 KB, patch)
2024-03-29 21:35 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty (2.06 KB, patch)
2024-03-29 21:53 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table (1.25 KB, patch)
2024-03-29 22:15 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty (2.13 KB, patch)
2024-04-02 11:20 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table (1.30 KB, patch)
2024-04-02 11:20 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty (2.19 KB, patch)
2024-04-03 07:19 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table (1.37 KB, patch)
2024-04-03 07:20 UTC, Emmi Takkinen
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Hammat wele 2024-03-29 21:14:48 UTC
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
Comment 1 Hammat wele 2024-03-29 21:35:43 UTC Comment hidden (obsolete)
Comment 2 Hammat wele 2024-03-29 21:53:37 UTC
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
Comment 3 Hammat wele 2024-03-29 22:15:14 UTC
Created attachment 164156 [details] [review]
Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table
Comment 4 Owen Leonard 2024-04-02 11:20:50 UTC
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>
Comment 5 Owen Leonard 2024-04-02 11:20:53 UTC
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>
Comment 6 Emmi Takkinen 2024-04-03 07:19:59 UTC
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>
Comment 7 Emmi Takkinen 2024-04-03 07:20:33 UTC
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>