From 8104bd46c4c6a694a66c1b906b9014164c187261 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 9 Mar 2011 18:26:43 +0000 Subject: [PATCH] Automatically handle converting+adding text categories without explicit translation --- timesheet/inc/class.timesheet_import_csv.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/timesheet/inc/class.timesheet_import_csv.inc.php b/timesheet/inc/class.timesheet_import_csv.inc.php index 657fd704dc..7c6989da6a 100644 --- a/timesheet/inc/class.timesheet_import_csv.inc.php +++ b/timesheet/inc/class.timesheet_import_csv.inc.php @@ -163,6 +163,9 @@ class timesheet_import_csv implements importexport_iface_import_plugin { // don't import empty records if( count( array_unique( $record ) ) < 2 ) continue; + // Automatically handle text categories without explicit translation + $record['cat_id'] = importexport_helper_functions::cat_name2id($record['cat_id']); + // Set creator, unless it's supposed to come from CSV file if($_definition->plugin_options['creator_from_csv']) { if(!is_numeric($record['ts_owner'])) {