From daea81489f2aade297894f4de2115146b9835d69 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 2 Mar 2011 17:26:03 +0000 Subject: [PATCH] By default, export all custom fields, use field labels instead of names, fix exporting field labels --- .../inc/class.timesheet_export_csv.inc.php | 1 + timesheet/setup/importexport_default.xml | 70 ++++++++++--------- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/timesheet/inc/class.timesheet_export_csv.inc.php b/timesheet/inc/class.timesheet_export_csv.inc.php index da3c0ed82e..1bb40854af 100644 --- a/timesheet/inc/class.timesheet_export_csv.inc.php +++ b/timesheet/inc/class.timesheet_export_csv.inc.php @@ -47,6 +47,7 @@ class timesheet_export_csv implements importexport_iface_export_plugin { $options['begin_with_fieldnames'] = true; $export_object = new importexport_export_csv($_stream, (array)$options); + $export_object->set_mapping($options['mapping']); // $options['selection'] is array of identifiers as this plugin doesn't // support other selectors atm. diff --git a/timesheet/setup/importexport_default.xml b/timesheet/setup/importexport_default.xml index c64a5a7897..5bcd74781a 100644 --- a/timesheet/setup/importexport_default.xml +++ b/timesheet/setup/importexport_default.xml @@ -13,30 +13,30 @@ export Default - Admins - America/Edmonton - ts_id - ts_project - ts_title - cat_id - ts_description - ts_start - ts_duration - ts_quantity - ts_unitprice - ts_owner - ts_modifier - ts_status - pm_id + Timesheet ID + Project + Title + Category + Description + Start + Duration + Quantity + Unitprice + Owner + Modifier + Status + Projectid + timesheet ; utf-8 label 1 + 2011-03-02 10:23:32 import-timesheet @@ -45,7 +45,6 @@ import Default - Admins ; @@ -53,24 +52,23 @@ 1 add - ts_id - ts_project - ts_title - ts_description - ts_start - ts_duration - ts_quantity - ts_unitprice - cat_id - ts_owner - ts_modified - ts_modifier - pl_id - ts_status - user_timezone_read - no_csv_1 - no_csv_2 - no_csv_3 + ts_project + ts_title + ts_description + ts_start + ts_duration + ts_quantity + ts_unitprice + cat_id + ts_owner + ts_modified + ts_modifier + pl_id + ts_status + user_timezone_read + no_csv_1 + no_csv_2 + no_csv_3 ts_id @@ -105,7 +103,11 @@ 0 1 + + + + 2011-03-02 10:18:47