[Bug 6280] New: Invalid SQL being passed in circulation checkout
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Bug #: 6280 Summary: Invalid SQL being passed in circulation checkout Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: colin.campbell@ptfs-europe.com QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com Bug 5952 changed the interface to C4::Members::GetPendingIssues however in circulation.pl it is now being called with an empty array in many cases so that a simple checkout is resulting in two calls the first (for the borrower succeeds) the second for the relatives fails to getting an error return from the database This is not good -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|kyle.m.hall@gmail.com |colin.campbell@ptfs-europe. | |com --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> 2011-04-28 13:48:46 UTC --- Created attachment 4014 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4014 Proposed Patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff Severity|enhancement |normal -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> 2011-06-09 13:42:04 UTC --- Is an error this patch addresses? circulation.pl: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY issues.issuedate' at line 25 at /kohaclone/C4/Members.pm line 1070 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 --- Comment #3 from Colin Campbell <colin.campbell@ptfs-europe.com> 2011-06-09 14:22:39 UTC --- Yes its executing bad syntax like WHERE ORDER BY and the second (failing) query is unnecessary -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #4014|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> 2011-06-09 14:32:11 UTC --- Created attachment 4438 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4438 Signed-off patch Although I'm not qualified to evaluate how it does it, applying this patch quiets the errors I was seeing in the log from circulation.pl so I'm signing off. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dev_patches@biblibre.com --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-07-08 10:30:47 UTC --- *** Bug 6568 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #4438|0 |1 is obsolete| | --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> 2011-08-10 13:00:53 UTC --- Created attachment 4935 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4935 proposed patch (passed QA) QA comment * works as announced, usefull patch, logs will thank you forever ;-) * Just a minor comment/suggestion. You write: +if ( @borrowernumbers ) { + $relissue = GetPendingIssues(@borrowernumbers); +} It's correct although it's more perlish to have : $relissue = GetPendingIssues(@borrowernumbers) if @borrowernumbers; I agree with the change - ($_->{date_due} lt $today) and $_->{overdue} = 1; to + if ($_->{date_due} and $_->{date_due} lt $today) { + $_->{overdue} = 1; + } (we must be Perlish, but sometimes that result in really cryptic things...) passed QA -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Patch Status|Signed Off |Passed QA -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 --- Comment #7 from Colin Campbell <colin.campbell@ptfs-europe.com> 2011-08-10 14:44:04 UTC --- Paul it is considered bad practice in many perl circles these days to use postfix if except for flow of control statements e.g. " LAST if $x;". They cause problems because people often miss them when rereading code. The default policies in perlcritic will warn against them see Perl Best Practices for a rationale -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #8 from Chris Cormack <chris@bigballofwax.co.nz> 2011-08-10 18:59:29 UTC --- I agree with Colin, we should follow Perl best practices where ever we can. And if you look at bug 6679, you will see we are extending the Perl::Critic tests slowly to cover everything. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Passed QA |Patch Pushed --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> 2011-08-11 00:56:46 UTC --- Pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6280 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian.walls@bywatersolutions. | |com --- Comment #10 from Ian Walls <ian.walls@bywatersolutions.com> 2011-09-30 18:42:40 UTC --- *** Bug 6805 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org