Koha/koha-tmpl/intranet-tmpl/prog/en
David Cook 3834d1f2b4 Bug 10457: fix SQL error when using 'export select items data' in serials claims page
Currently, if you use the "check all" checkbox next to the "Vendor"
table header, and try to "Export selected items data", you'll
see the following SQL error in the Apache error log:

DBD::mysql::st execute failed: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for
the right syntax to use near 'on ORDER BY title' at line 12 at
/.../lib/C4/Serials.pm line 1828.

This is because the Javascript that produces the re-direct URL is
including the value of the checkall checkbox, which is "on",
as a "serialid".

We need to only take checkboxes with a name of "serialid" when
crafting the re-direct link.

This patch adds the [name=serialid] attribute selector to the Jquery
that creates the URL to lateissues-excel.pl from claims.pl.

Test Plan:

Before applying the patch:

1) Go to Serials > Claims (found on the left navigation bar of Serials)
2) Choose a vendor that has serials to claim (or create some late
serials for a vendor so that they will show up)
3) Click on the checkbox to the left of the "Vendor" table heading.
4) Click "Export selected items data" at the bottom of the page
5) Check the Apache error log.  Notice that you'll get a SQL error
   like the one in the message above.

Apply the patch.

Repeat Steps 1-4.

Note that you should now have a CSV file downloading rather than
getting a SQL error.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-18 16:44:32 +00:00
..
css Bug 9757: Make staff client list contents view more like search results 2013-06-26 09:04:04 -07:00
includes Bug 10597: fix Search to hold button on record details page 2013-07-18 13:57:53 +00:00
js Bug 10541: enable cross-browser AJAX in additem.js 2013-07-17 16:36:11 +00:00
lib Bug 9034: Add sorting and filtering on items table (catalogue/detail.pl) 2013-02-07 19:35:51 -05:00
modules Bug 10457: fix SQL error when using 'export select items data' in serials claims page 2013-07-18 16:44:32 +00:00
xslt Bug 10284: Add missing spaces between label and content in XSLT view (780/785) 2013-05-28 07:44:05 -07:00
columns.def