Bugzilla – Attachment 44244 Details for
Bug 15087
hardduedate should not be inserted as 0000-00-00 but NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 15087: hardduedate should not be inserted as 0000-00-00 but NULL
PASSED-QA-Bug-15087-hardduedate-should-not-be-inse.patch (text/plain), 1.88 KB, created by
Kyle M Hall
on 2015-10-30 18:13:24 UTC
(
hide
)
Description:
[PASSED QA] Bug 15087: hardduedate should not be inserted as 0000-00-00 but NULL
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2015-10-30 18:13:24 UTC
Size:
1.88 KB
patch
obsolete
>From b91c5b78be3ed2ae01b0b88ad072a1c704d3e60d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 30 Oct 2015 11:49:40 +0000 >Subject: [PATCH] [PASSED QA] Bug 15087: hardduedate should not be inserted as 0000-00-00 but NULL > >This has been introduced by bug 14949, recently pushed. >So I don't think we need to update the DB, only devs will face this >problem. > >The hardduedate was inserted as 0000-00-00 because was en empty string. >To be inserted as NULL, the value should be undef. > >Test plan: >0/ Don't apply this patch >1/ Edit a circ rules and don't fill the hard due date >2/ Look at the DB, the value is 0000-00-00 >3/ Apply this patch and confirm that the value is now NULL > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Confirmed >+--------------+----------+-------------+ >| categorycode | itemtype | hardduedate | >+--------------+----------+-------------+ >| * | * | NULL | >+--------------+----------+-------------+ > >No koha-qa errors > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > admin/smart-rules.pl | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 1be26e3..d43c686 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -127,7 +127,7 @@ elsif ($op eq 'add') { > $maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/; > my $issuelength = $input->param('issuelength'); > my $lengthunit = $input->param('lengthunit'); >- my $hardduedate = $input->param('hardduedate'); >+ my $hardduedate = $input->param('hardduedate') || undef; > $hardduedate = eval { dt_from_string( $input->param('hardduedate') ) } if ( $hardduedate ); > $hardduedate = output_pref( { dt => $hardduedate, dateonly => 1, dateformat => 'iso' } ) if ( $hardduedate ); > my $hardduedatecompare = $input->param('hardduedatecompare'); >-- >1.7.2.5
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 15087
:
44181
|
44194
|
44197
|
44198
| 44244 |
52003