LP#1721807: fix webstaff report templates that have might_have and has_many joins user/gmcharlt/lp1721807_webstaff_reporter_joins
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 6 Mar 2018 23:00:23 +0000 (18:00 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 7 Mar 2018 19:30:32 +0000 (14:30 -0500)
commit2e0549b5e51b3e859ebdc736936d8fefb5f1a124
treed2959ea862569fa2ccf3f428a8dbd56a559933f4
parent018d95673442d7509a0ef5f951a1a4b2756350a9
LP#1721807: fix webstaff report templates that have might_have and has_many joins

This patch fixes a bug where using a virtual field in the web staff
report template editor to join another table would result in a syntax
error in the generated SQL.

To test
-------
[1] Apply the patch and verify that the regression test in the previous
    commit passes.
[2] Create new report template in the web staff client that include
    virtual fields and joins and verify that they work. One example
    would be a report that uses ILS User as the base source and joins
    in the patron notes virtual field.
[3] If available, clone a report template originally created in the web
    staff client that had previously failed, then save it. The new
    report should work.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/reporter/template/app.js