[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:28:52 CEST 2017


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

--- Comment #8 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Tomás Cohen Arazi from comment #7)
> 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.

I'm sorry for the first part of my comment, it is already a modal, and has an
'Update' button. I just messed up with the rebase.

I'd still add a note.

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


More information about the Koha-bugs mailing list