[Koha-bugs] [Bug 10606] New: query in GetUpcomingDueIssues

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 17 17:56:01 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10606

            Bug ID: 10606
           Summary: query in GetUpcomingDueIssues
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: gmcharlt at gmail.com
          Reporter: gmcharlt at gmail.com
        QA Contact: testopia at bugs.koha-community.org

The patch for bug 9362 (which I did accept into master) introduces a MySQLism:

Using HAVING without GROUP BY is a MySQLism, so at some point the query will
have to become:

SELECT issues.*, items.itype as itemtype, items.homebranch, TO_DAYS( date_due
)-TO_DAYS( NOW() ) as days_until_due, branches.branchemail
FROM issues
LEFT JOIN items USING (itemnumber)
LEFT OUTER JOIN branches USING (branchcode)
WHERE returndate is NULL
AND (TO_DAYS( date_due )-TO_DAYS( NOW() )) > 0 
AND (TO_DAYS( date_due )-TO_DAYS( NOW() )) < ?;

This is a pity, as it would be nice to be able to use "days_until_due" as an
alias to make the query more readable, but it simply isn't portable.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list