- Add/fix labels for creation date, pricelist

- Fix export filtering on assigned
This commit is contained in:
Nathan Gray 2013-01-02 18:14:05 +00:00
parent 5564217b0c
commit 97fea10521
3 changed files with 12 additions and 3 deletions

View File

@ -24,7 +24,7 @@ class infolog_egw_record implements importexport_iface_egw_record
// Used in conversions
static $types = array(
'select' => array('info_type', 'info_status', 'info_priority', 'info_pricelist'),
'select' => array('info_type', 'info_status', 'info_priority', 'pl_id'),
'select-cat' => array('info_cat'),
'select-account' => array('info_owner','info_responsible','modifier'),
'date-time' => array('info_startdate', 'info_enddate','info_datecompleted', 'info_datemodified','info_created'),

View File

@ -63,6 +63,12 @@ class infolog_export_csv implements importexport_iface_export_plugin {
$fields = importexport_helper_functions::get_filter_fields($_definition->application, $this);
$query['col_filter'] = $_definition->filter;
// Backend expects a string
if($query['col_filter']['info_responsible'])
{
$query['col_filter']['info_responsible'] = implode(',',$query['col_filter']['info_responsible']);
}
// Handle ranges
foreach($query['col_filter'] as $field => $value)
{
@ -127,7 +133,7 @@ class infolog_export_csv implements importexport_iface_export_plugin {
if(!is_array($selection[$id])) break;
$selection[$id]['pm_id'] = current($links);
$selection[$id]['project'] = egw_link::title('projectmanager', $selection[$id]['pm_id']);
$this->selects['info_pricelist'] = ExecMethod('projectmanager.projectmanager_pricelist_bo.pricelist',$selection[$id]['pm_id']);
$this->selects['pl_id'] = ExecMethod('projectmanager.projectmanager_pricelist_bo.pricelist',$selection[$id]['pm_id']);
}
}
@ -234,7 +240,7 @@ class infolog_export_csv implements importexport_iface_export_plugin {
{
$this->selects['info_type'] = $this->bo->enums['type'];
$this->selects['info_priority'] = $this->bo->enums['priority'];
$this->selects['info_pricelist'] = ExecMethod('projectmanager.projectmanager_pricelist_bo.pricelist',false);
$this->selects['pl_id'] = ExecMethod('projectmanager.projectmanager_pricelist_bo.pricelist',false);
$this->selects['info_status'] = $this->bo->get_status();
}

View File

@ -18,6 +18,9 @@ class infolog_wizard_export_csv extends importexport_wizard_basic_export_csv
// Field mapping
$bo = new infolog_tracking(new infolog_bo());
$this->export_fields = array('info_id' => 'Infolog ID', 'pm_id' => 'Project ID', 'project' => 'Project Name') + $bo->field2label;
// Add in created date, in the appropriate place
$first = array_splice($this->export_fields, 0, array_search('info_datemodified',array_keys($this->export_fields)));
$this->export_fields = array_merge($first, array('info_created'=>'creation'), $this->export_fields);
// Custom fields
unset($this->export_fields['custom']); // Heading, not a real field