Bug 14572

Summary: insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT
Product: Koha Reporter: Mason James <mtj>
Component: Architecture, internals, and plumbingAssignee: Mason James <mtj>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: chris, fridolin.somers, katrin.fischer, m.de.rooy, rsantellan
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT
Bug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT
Bug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT

Description Mason James 2015-07-21 00:49:41 UTC
C4::Calendar::insert_single_holiday() forces a value on (id) an AUTO_INCREMENT column, during an INSERT


 my $insertHoliday = $dbh->prepare("insert into special_holidays (id,branchcode,day,month,year,isexception,title,description) values ('', ?,?,?,?,?,?,?)");
Comment 1 Rodrigo Santellan 2017-06-21 18:48:39 UTC
Created attachment 64498 [details] [review]
Bug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT

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.
Comment 2 Lee Jamison 2017-06-22 17:13:58 UTC
Created attachment 64551 [details] [review]
Bug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT

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>
Works as directed. Passes QA Tools and Holidays.t
Comment 3 Marcel de Rooy 2017-06-23 06:27:43 UTC
Hmm
Author: Your Full Name <your_email>

Reading this report, it seems that Rodrigo is the author.
If so, Rodrigo, please adjust your settings for git/git-bz in the future.
Comment 4 Marcel de Rooy 2017-06-23 06:29:20 UTC
Created attachment 64576 [details] [review]
Bug 14572 - insert_single_holiday() forces a value on an AUTO_INCREMENT column, during an INSERT

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>
Comment 5 Jonathan Druart 2017-07-06 18:48:09 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 6 Fridolin Somers 2017-07-12 09:26:40 UTC
Pushed to 17.05.x, will be in 17.05.02
Comment 7 Katrin Fischer 2017-07-16 11:51:46 UTC
This patch has been pushed to 16.11.x and will be in 16.11.10.
Comment 8 Mason James 2017-07-31 12:01:04 UTC
Pushed to 16.05.x, for 16.05.15 release