From 327657b86b39bdf1d51bf073f5adc783d5def27d Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 14 Mar 2017 09:56:00 -0600 Subject: [PATCH] If timesheet project changes, update the project title field to match --- timesheet/inc/class.timesheet_bo.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/timesheet/inc/class.timesheet_bo.inc.php b/timesheet/inc/class.timesheet_bo.inc.php index 6959f3307d..06953bf252 100644 --- a/timesheet/inc/class.timesheet_bo.inc.php +++ b/timesheet/inc/class.timesheet_bo.inc.php @@ -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)