From 597d2f6dcc10b722646a193b8fc73886635ad0c3 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 6 Apr 2011 17:22:37 +0000 Subject: [PATCH] Strip leading spaces from status labels for better matching --- timesheet/inc/class.timesheet_import_csv.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/timesheet/inc/class.timesheet_import_csv.inc.php b/timesheet/inc/class.timesheet_import_csv.inc.php index acd643cb78..2d1c5102b8 100644 --- a/timesheet/inc/class.timesheet_import_csv.inc.php +++ b/timesheet/inc/class.timesheet_import_csv.inc.php @@ -150,6 +150,12 @@ class timesheet_import_csv implements importexport_iface_import_plugin { 'cat_id' => $categories->return_sorted_array(0,False,'','','',true) ); + // Status need leading spaces removed + foreach($lookups['ts_status'] as $id => &$label) { + $label = str_replace(' ', '',trim($label)); + if($label == '') unset($lookups['ts_status'][$id]); + } + // Start counting successes $count = 0; $this->results = array();