Bugzilla – Attachment 164254 Details for
Bug 36466
Incorrect date value stored when "Published on" or "Expected on" are empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty
Bug-36466-Incorrect-date-value-stored-when-Publish.patch (text/plain), 2.13 KB, created by
Owen Leonard
on 2024-04-02 11:20:50 UTC
(
hide
)
Description:
Bug 36466: Incorrect date value stored when 'Published on' or 'Expected on' are empty
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-04-02 11:20:50 UTC
Size:
2.13 KB
patch
obsolete
>From f9cd8ad8fd547a9b8937e06e64acddbcc7f05d6f Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Fri, 29 Mar 2024 21:52:47 +0000 >Subject: [PATCH] Bug 36466: Incorrect date value stored when 'Published on' or > 'Expected on' are empty >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> >--- > serials/serials-edit.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index 6acefa5918..d1388f0c64 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -209,10 +209,10 @@ if ( $op and $op eq 'cud-serialchangestatus' ) { > my ($plan_date, $pub_date); > > if (defined $planneddates[$i] && $planneddates[$i] ne 'XXX') { >- $plan_date = $planneddates[$i]; >+ $plan_date = $planneddates[$i] || $today; > } > if (defined $publisheddates[$i] && $publisheddates[$i] ne 'XXX') { >- $pub_date = $publisheddates[$i]; >+ $pub_date = $publisheddates[$i] || $today; > } > > if ( $serialids[$i] && $serialids[$i] eq 'NEW' ) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36466
:
164153
|
164155
|
164156
|
164254
|
164255
|
164306
|
164307
|
166601
|
166602