Bug 15493: Use the correct CSV profile when exporting records from the export tool
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 6 Jan 2016 16:17:10 +0000 (16:17 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 7 Jan 2016 18:32:55 +0000 (18:32 +0000)
The CSV profile used is not the one the user has chosen, but the one
defined in the pref ExportWithCsvProfile.

It's caused by a wrong variable name csv_profile vs csv_profile_id

Test plan:
Define 1+ csv profiles
Set ExportWithCsvProfile with 1 of these profile
Use the export tool to export some records using a csv profile.
Without this patch, the csv profile used, will always be the one defined
in ExportWithCsvProfile.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt

index ba90c8f..83bc50a 100644 (file)
@@ -139,7 +139,7 @@ $(document).ready(function() {
         </li>
         <li class="csv_profiles">
             <label for="bibs_csv_profile">CSV profile: </label>
-            <select id="bibs_csv_profile" name="csv_profile">
+            <select id="bibs_csv_profile" name="csv_profile_id">
                 [% FOR csv_profile IN csv_profiles %]
                     <option value="[% csv_profile.export_format_id %]">[% csv_profile.profile %]</option>
                 [% END %]