If timesheet project changes, update the project title field to match

This commit is contained in:
nathangray 2017-03-14 09:56:00 -06:00
parent 8c9bbcf777
commit 327657b86b

View File

@ -605,6 +605,11 @@ class timesheet_bo extends Api\Storage
{
return false;
}
// Update ts_project to match project
if ($this->pm_integration == 'full' && $old && $old['pm_id'] != $new['pm_id'])
{
$new['ts_title'] = $new['pm_id'] ? Link::title('projectmanager', $new['pm_id']) : '';
}
// Check for restore of deleted contact, restore held links
if($old && $old['ts_status'] == self::DELETED_STATUS && $new['ts_status'] != self::DELETED_STATUS)