Strip leading spaces from status labels for better matching

This commit is contained in:
Nathan Gray 2011-04-06 17:22:37 +00:00
parent 49f8cc3258
commit 597d2f6dcc

View File

@ -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();