set ts_project for export/merge from ts_project_blur, where it get moved, if it is no custom value

This commit is contained in:
Ralf Becker 2014-11-19 13:51:09 +00:00
parent 674fd0736a
commit a6767139a0
3 changed files with 7 additions and 10 deletions

View File

@ -42,7 +42,10 @@ class timesheet_egw_record implements importexport_iface_egw_record
public function __construct( $_identifier='' ){
$this->identifier = $_identifier;
$this->botimesheet = new timesheet_bo();
$this->set_record($this->botimesheet->read($this->identifier));
$data = $this->botimesheet->read($this->identifier);
// set ts_project from ts_project_blur, where it get moved, if it is no custom value
if (empty($data['ts_project'])) $data['ts_project'] = $data['ts_project_blur'];
$this->set_record($data);
}
/**

View File

@ -83,12 +83,6 @@ class timesheet_export_csv implements importexport_iface_export_plugin {
// support other selectors atm.
foreach ($selection as $identifier) {
$record = new timesheet_egw_record($identifier);
// If Project is not set, set it to current project title
if(!$record->ts_project && $record->pm_id)
{
$record->ts_project = egw_link::title ('projectmanager', $record->pm_id);
}
if($options['convert']) {
importexport_export_csv::convert($record, timesheet_egw_record::$types, 'timesheet', $this->selects);
} else {

View File

@ -120,9 +120,9 @@ class timesheet_merge extends bo_merge
$selects['ts_'.$name] = $value;
}
if($content && strpos($content, '#') !== 0)
{
$this->cf_link_to_expand($record->get_record_array(), $content, $info);
}
{
$this->cf_link_to_expand($record->get_record_array(), $content, $info);
}
importexport_export_csv::convert($record, $types, 'timesheet', $selects);