mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Don't overwrite numeric owner IDs from successful conversion
This commit is contained in:
parent
7962433e27
commit
a8e8d82f64
@ -219,7 +219,8 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set creator, unless it's supposed to come from CSV file
|
// Set creator, unless it's supposed to come from CSV file
|
||||||
if($_definition->plugin_options['owner_from_csv'] && $record['ts_owner'] && !is_numeric($record['ts_owner'])) {
|
if($_definition->plugin_options['owner_from_csv'] && $record['ts_owner']) {
|
||||||
|
if(!is_numeric($record['ts_owner'])) {
|
||||||
// Automatically handle text owner without explicit translation
|
// Automatically handle text owner without explicit translation
|
||||||
$new_owner = importexport_helper_functions::account_name2id($record['ts_owner']);
|
$new_owner = importexport_helper_functions::account_name2id($record['ts_owner']);
|
||||||
if($new_owner == '') {
|
if($new_owner == '') {
|
||||||
@ -233,6 +234,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
|
|||||||
} else {
|
} else {
|
||||||
$record['ts_owner'] = $new_owner;
|
$record['ts_owner'] = $new_owner;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} elseif ($_definition->plugin_options['creator']) {
|
} elseif ($_definition->plugin_options['creator']) {
|
||||||
$record['ts_owner'] = $_definition->plugin_options['creator'];
|
$record['ts_owner'] = $_definition->plugin_options['creator'];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user