[Koha-bugs] [Bug 3017] New: guided reports: save_report() corrupts sql query

bugzilla-daemon at pippin.metavore.com bugzilla-daemon at pippin.metavore.com
Mon Mar 9 03:11:25 CET 2009


http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=3017

           Summary: guided reports: save_report() corrupts sql query
           Product: Koha
           Version: rel_3_0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Reports
        AssignedTo: galen.charlton at liblime.com
        ReportedBy: mason.loves.sushi at gmail.com
         QAContact: koha-bugs at lists.koha.org


an enthusiastic regex removes trailing characters from the saved sql query

 sub save_report {
     my ( $sql, $name, $type, $notes ) = @_;
     my $dbh = C4::Context->dbh();
    $sql =~ s/(\W*)$//;     <<<<<<<<<<<<<<<<<<


eg: saving this sql...

select count(dateaccessioned) from items where dateaccessioned "2008-01-01" and
dateaccessioned < "2010-01-01"

becomes... (no trailing /"/)

select count(dateaccessioned) from items where dateaccessioned "2008-01-01" and
dateaccessioned < "2010-01-01

patch for 3.0.x attached..




------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



More information about the Koha-bugs mailing list