Bugzilla – Attachment 64576 Details for
Bug 14572
insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT
Bug-14572---insertsingleholiday-forces-a-value-on-.patch (text/plain), 4.03 KB, created by
Marcel de Rooy
on 2017-06-23 06:29:20 UTC
(
hide
)
Description:
Bug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-06-23 06:29:20 UTC
Size:
4.03 KB
patch
obsolete
>From e065d5ca22df42464e96cd1610db0e0b04cf5c44 Mon Sep 17 00:00:00 2001 >From: Rodrigo Santellan <rsantellan@gmail.com> >Date: Wed, 21 Jun 2017 15:40:43 -0300 >Subject: [PATCH] Bug 14572 - insert_single_holiday() forces a value on an > AUTO_INCREMENT column, during an INSERT >Content-Type: text/plain; charset=utf-8 > >Removing all the id from the columns on the inserts and removing the >parameter '' of the values for the id. > >Test plan: >1) Go to tools -> calendar >2) Add a Holiday only on this day. >3) Add a Holiday repeated every same day of the week. >4) Add a Holiday repeated yearly on the same date. >5) Add a Holidays on a range. >6) Add a Holidays repeated yearly on a range. >7) You should have the five calendars displayed. > >Signed-off-by: Lee Jamison <ldjamison@marywood.edu> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Calendar.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Calendar.pm b/C4/Calendar.pm >index 2c1b0d8..321aad7 100644 >--- a/C4/Calendar.pm >+++ b/C4/Calendar.pm >@@ -201,7 +201,7 @@ sub insert_week_day_holiday { > croak "Invalid weekday $weekday" unless $weekday =~ m/^[0-6]$/; > > my $dbh = C4::Context->dbh(); >- my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (id,branchcode,weekday,day,month,title,description) values ( '',?,?,NULL,NULL,?,? )"); >+ my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (branchcode,weekday,day,month,title,description) values ( ?,?,NULL,NULL,?,? )"); > $insertHoliday->execute( $self->{branchcode}, $weekday, $options{title}, $options{description}); > $self->{'week_days_holidays'}->{$weekday}{title} = $options{title}; > $self->{'week_days_holidays'}->{$weekday}{description} = $options{description}; >@@ -232,7 +232,7 @@ sub insert_day_month_holiday { > my %options = @_; > > my $dbh = C4::Context->dbh(); >- my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (id,branchcode,weekday,day,month,title,description) values ('', ?, NULL, ?, ?, ?,? )"); >+ my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (branchcode,weekday,day,month,title,description) values (?, NULL, ?, ?, ?,? )"); > $insertHoliday->execute( $self->{branchcode}, $options{day},$options{month},$options{title}, $options{description}); > $self->{'day_month_holidays'}->{"$options{month}/$options{day}"}{title} = $options{title}; > $self->{'day_month_holidays'}->{"$options{month}/$options{day}"}{description} = $options{description}; >@@ -269,7 +269,7 @@ sub insert_single_holiday { > > my $dbh = C4::Context->dbh(); > my $isexception = 0; >- my $insertHoliday = $dbh->prepare("insert into special_holidays (id,branchcode,day,month,year,isexception,title,description) values ('', ?,?,?,?,?,?,?)"); >+ my $insertHoliday = $dbh->prepare("insert into special_holidays (branchcode,day,month,year,isexception,title,description) values (?,?,?,?,?,?,?)"); > $insertHoliday->execute( $self->{branchcode}, $options{day},$options{month},$options{year}, $isexception, $options{title}, $options{description}); > $self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title} = $options{title}; > $self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description}; >@@ -315,7 +315,7 @@ sub insert_exception_holiday { > > my $dbh = C4::Context->dbh(); > my $isexception = 1; >- my $insertException = $dbh->prepare("insert into special_holidays (id,branchcode,day,month,year,isexception,title,description) values ('', ?,?,?,?,?,?,?)"); >+ my $insertException = $dbh->prepare("insert into special_holidays (branchcode,day,month,year,isexception,title,description) values (?,?,?,?,?,?,?)"); > $insertException->execute( $self->{branchcode}, $options{day},$options{month},$options{year}, $isexception, $options{title}, $options{description}); > $self->{'exception_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title} = $options{title}; > $self->{'exception_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description}; >-- >2.1.4
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 14572
:
64498
|
64551
| 64576