[Bug 22907] New: Cannot add new suggestion with strict SQL modes turned on
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Bug ID: 22907 Summary: Cannot add new suggestion with strict SQL modes turned on Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Acquisitions Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Target Milestone: --- DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: '' for column 'copyrightdate' at row 1 at /home/vagrant/kohaclone/C4/Suggestions.pm line 457 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89763 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89763&action=edit Bug 22907: Add tests Do not use copyrightdate as it is weird to have it int -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89764&action=edit Bug 22907: Fix new suggestion with strict sql modes With sql_strict_modes turned on, if you try to create a new suggestion you will get: Incorrect integer value: '' for column '$INT_COLUMN' at row 1 Test plan: Turn on strict_sql_modes, create a new suggestion, then edit it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17258 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17258 [Bug 17258] [OMNIBUS] MySQL 5.7 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22908 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22908 [Bug 22908] Modsuggestion will generate a notice even if the modification failed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12627 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 [Bug 12627] SQLHelper replacement - C4::Suggestions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89764|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89767 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89767&action=edit Bug 22907: Fix new suggestion with strict sql modes With sql_strict_modes turned on, if you try to create a new suggestion you will get: Incorrect integer value: '' for column '$INT_COLUMN' at row 1 Test plan: Turn on strict_sql_modes, create a new suggestion, then edit it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89768 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89768&action=edit Bug 22907: Remove previous code handling the same thing See: commit a71b96295fb07084e4f87ac1a471e89355f3c5a4 Bug 12627: Fix default values -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Note that the new test will generate a DBI error, we already have one in the tests (from Patrons.t IIRC). I will try to deal with them on a separate bug report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89865 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89865&action=edit Bug 22907: Add missing use statement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89763|0 |1 is obsolete| | Attachment #89767|0 |1 is obsolete| | Attachment #89768|0 |1 is obsolete| | Attachment #89865|0 |1 is obsolete| | --- Comment #7 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 89872 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89872&action=edit Bug 22907: Add tests Do not use copyrightdate as it is weird to have it int Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #8 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 89873 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89873&action=edit Bug 22907: Fix new suggestion with strict sql modes With sql_strict_modes turned on, if you try to create a new suggestion you will get: Incorrect integer value: '' for column '$INT_COLUMN' at row 1 Test plan: Turn on strict_sql_modes, create a new suggestion, then edit it. Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #9 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 89874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89874&action=edit Bug 22907: Remove previous code handling the same thing See: commit a71b96295fb07084e4f87ac1a471e89355f3c5a4 Bug 12627: Fix default values Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #10 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 89875 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89875&action=edit Bug 22907: Add missing use statement Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED CC| |m.de.rooy@rijksmuseum.nl --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Failed QA --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I am having trouble understanding what you do here and why you do it: --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt @@ -107,14 +107,19 @@ $(document).ready(function() { var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ - { "aTargets": [ 0 ], "bVisible": false, "bSearchable": true }, // must be searchable for fnFilter + { "aTargets": [ 0 ], "bVisible": false, "bSearchable": false }, { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, ], "sPaginationType": "four_button" })); $("#show_only_mine").on('click', function(e){ e.preventDefault(); + //suggestionst.settings()[0].aoColumns[index].bSearchable = true; + suggestionst.setColumnSearchable(0, true); + suggestionst.rows().invalidate(); suggestionst.fnFilter('^[% loggedinuser | html %]$', 0, true); + suggestionst.setColumnSearchable(0, false); + suggestionst.rows().invalidate(); This is not about adding a new suggestion but is about adding an order from an accepted suggestion. The form newordersuggestion has some problems in current master with and without your patch. The fnFilter on borrowernumber (only mine) does not seem to work at all.. It seems unrelated to the problem you are solving on this report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89873|0 |1 is obsolete| | Attachment #89874|0 |1 is obsolete| | Attachment #89875|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 90168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90168&action=edit Bug 22907: Fix new suggestion with strict sql modes With sql_strict_modes turned on, if you try to create a new suggestion you will get: Incorrect integer value: '' for column '$INT_COLUMN' at row 1 Test plan: Turn on strict_sql_modes, create a new suggestion, then edit it. Signed-off-by: Liz Rea <wizzyrea@gmail.com> JD: Edit after SO, remove unecessary changes (not related to this bug) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 90169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90169&action=edit Bug 22907: Remove previous code handling the same thing See: commit a71b96295fb07084e4f87ac1a471e89355f3c5a4 Bug 12627: Fix default values Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 90170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90170&action=edit Bug 22907: Add missing use statement Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #12)
I am having trouble understanding what you do here and why you do it: [...]
Oops, sorry for catching that. It was indeed related to another bug. I have amended the patch to remove those changes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89872|0 |1 is obsolete| | --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 90177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90177&action=edit Bug 22907: Add tests Do not use copyrightdate as it is weird to have it int Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90168|0 |1 is obsolete| | --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 90178 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90178&action=edit Bug 22907: Fix new suggestion with strict sql modes With sql_strict_modes turned on, if you try to create a new suggestion you will get: Incorrect integer value: '' for column '$INT_COLUMN' at row 1 Test plan: Turn on strict_sql_modes, create a new suggestion, then edit it. Signed-off-by: Liz Rea <wizzyrea@gmail.com> JD: Edit after SO, remove unecessary changes (not related to this bug) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90169|0 |1 is obsolete| | --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 90179 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90179&action=edit Bug 22907: Remove previous code handling the same thing See: commit a71b96295fb07084e4f87ac1a471e89355f3c5a4 Bug 12627: Fix default values Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90170|0 |1 is obsolete| | --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 90180 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90180&action=edit Bug 22907: Add missing use statement Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #21 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable Version(s)| |19.05.00, 18.11.06 released in| | CC| |martin.renvoize@ptfs-europe | |.com --- Comment #22 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22907 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24244 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24244 [Bug 24244] Cannot create suggestion with branch set to 'Any' -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org