[Koha-bugs] [Bug 21445] New: Report - having two date ranges in query creates a formatting issue when running report

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 27 20:47:36 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21445

            Bug ID: 21445
           Summary: Report - having two date ranges in query creates a
                    formatting issue when running report
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Reports
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: tgoatley at gmail.com
        QA Contact: testopia at bugs.koha-community.org

When the report is run like the following query, the second half of the second
date range does not display. 

SELECT borrowers.cardnumber, borrowers.surname, borrowers.firstname,
borrowers.dateofbirth, borrowers.dateenrolled
FROM borrowers
WHERE dateofbirth BETWEEN <<Date of Birth BETWEEN (yyyy-mm-dd)|date>> AND <<
AND (yyyy-mm-dd)|date>> AND dateenrolled BETWEEN <<Enrollment Date BETWEEN
(yyyy-mm-dd)|date>> AND <<and (yyyy-mm-dd)|date>> AND
branchcode=<<Branch|branches>>
ORDER BY borrowers.surname ASC

Reformatting the query as follows all dates ranges display correctly.

SELECT
    borrowers.cardnumber,
    borrowers.surname,
    borrowers.firstname,
    borrowers.dateofbirth,
    borrowers.dateenrolled
FROM
    borrowers
WHERE
    dateofbirth BETWEEN <<Date of Birth BETWEEN (yyyy-mm-dd)|date>> AND << AND
(yyyy-mm-dd)|date>> 
    AND dateenrolled BETWEEN <<Enrollment Date BETWEEN (yyyy-mm-dd)|date>> AND
<<and (yyyy-mm-dd)|date>> 
    AND branchcode=<<Branch|branches>>
    ORDER BY
    borrowers.surname ASC

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


More information about the Koha-bugs mailing list