fix not linked calendar's project links to timesheet, when creating timesheet by multi-select entries

This commit is contained in:
Hadi Nategh 2013-08-22 12:38:18 +00:00
parent 10f8c8e1ae
commit ab3ac17367

View File

@ -710,6 +710,20 @@ class calendar_uilist extends calendar_ui
}
$timesheet_bo->data = array();
$err = $timesheet_bo->save($timesheet);
//get the project manager linked to the calnedar entry
$calApp_links = egw_link::get_links('calendar', $event['id']);
foreach ($calApp_links as $l_app)
{
if ($l_app['app'] == 'projectmanager')
{
$prj_links = $l_app;
//Links timesheet to projectmanager
egw_link::link('timesheet', $timesheet_bo->data['ts_id'], 'projectmanager', $prj_links['id']);
}
}
if(!$err)
{
$success++;