Add Project ID to list of exportable fields

This commit is contained in:
Nathan Gray 2011-04-13 18:53:37 +00:00
parent babc62d9f1
commit 16cd36c017
2 changed files with 9 additions and 2 deletions

View File

@ -41,7 +41,7 @@ class infolog_egw_record implements importexport_iface_egw_record
$this->identifier = $_identifier;
$this->bo = new infolog_bo();
if($_identifier) {
$this->record = $this->bo->read($this->identifier);
$this->set_record($this->bo->read($this->identifier));
}
}
@ -96,6 +96,13 @@ class infolog_egw_record implements importexport_iface_egw_record
*/
public function set_record(array $_record){
$this->record = $_record;
// Check for linked project ID
$links = egw_link::get_links('infolog', $_record['info_id'], 'projectmanager');
foreach($links as $link_id => $app_id) {
$this->record['pm_id'] = $app_id;
break;
}
}
/**

View File

@ -17,7 +17,7 @@ class infolog_wizard_export_csv extends importexport_wizard_basic_export_csv
// Field mapping
$bo = new infolog_tracking();
$this->export_fields = array('info_id' => 'Infolog ID') + $bo->field2label;
$this->export_fields = array('info_id' => 'Infolog ID', 'pm_id' => 'Project ID') + $bo->field2label;
// Custom fields
unset($this->export_fields['custom']); // Heading, not a real field