[Koha-bugs] [Bug 17898] Add a way to automatically convert SQL reports

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 19 20:22:41 CEST 2017


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

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tomascohen at gmail.com

--- Comment #7 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
I've been trying to make up my mind before commenting. My conclusion is that
this is a really hard task to achieve, and thus the current behaviour (i.e.
propose a translated SQL, no magic stuff) is the way to go. I'd put it in a
modal, and probably add a legend stating that they should contact someone who
knows SQL to check before overwriting the old report (or the list).

This is an example that won't work with this simplistic algorithm, but we could
go forward without fixing it anyway, as reports are now broken for everyone
anyway:

    $sql = q|
    SELECT biblionumber,
           marcxml,
           biblioitems.issn AS issn
    FROM biblioitems
    INNER JOIN biblio USING (biblionumber)
    WHERE biblionumber = 14|;

    $expected_converted_sql = q|
    SELECT biblionumber,
           metadata,
           biblioitems.issn AS issn
    FROM biblioitems
    INNER JOIN biblio USING (biblionumber)
    INNER JOIN biblio_metadata USING (biblionumber)
    WHERE biblionumber = 14|;

so the algorithm works basically only if the query uses marcxml exclusively.

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


More information about the Koha-bugs mailing list