Bug 14710: Make the export checkout list export only the checked out item infos
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 24 Aug 2015 12:19:28 +0000 (13:19 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 25 Sep 2015 18:36:00 +0000 (15:36 -0300)
This has been introduced by bug 11703.

Bug 13190 should have been fixed it.

If the pref ExportWithCsvProfile is defined with a MARC CSV profile and
it contains item infos to display, only info from the checked out item
should be displayed.

Test plan:
0/ Don't apply this patch
1/ Create a biblio with 1+ items
2/ Check one of the item out to a patron
3/ Define a CSV profile which contains item fields ("245$a|952$p" for instance)
4/ Export the item (from circ/circulation/pl) using the CSV option
Note that the csv contains the barcode from all items
5/ Apply this patch and repeat 4.
6/ Note that the csv contains only the barcode from the checked out
item.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js

index 485c292..358a4d0 100644 (file)
@@ -374,7 +374,10 @@ $(document).ready(function() {
                     "bVisible": exports_enabled ? true : false,
                     "bSortable": false,
                     "mDataProp": function ( oObj ) {
-                        return "<input type='checkbox' class='export' id='export_" + oObj.biblionumber + "' name='biblionumbers' value='" + oObj.biblionumber + "' />";
+                        var s = "<input type='checkbox' name='itemnumbers' value='" + oObj.itemnumber + "' style='visibility:hidden;' />";
+
+                        s += "<input type='checkbox' class='export' id='export_" + oObj.biblionumber + "' name='biblionumbers' value='" + oObj.biblionumber + "' />";
+                        return s;
                     }
                 }
             ],