From 659bf156f6c290391511381d6d6c7d66ebdd58ea Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 26 Aug 2016 10:27:36 +0200 Subject: [PATCH] Fix projectmanager link does not get set for new timesheet entry --- timesheet/inc/class.timesheet_ui.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 0b804bd373..5d13ef3f21 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -338,7 +338,6 @@ class timesheet_ui extends timesheet_bo switch ($link_app) { case 'projectmanager': - $content['pm_id'] = $link_id; $links[] = $link_id; // fall-through; default: @@ -378,7 +377,7 @@ class timesheet_ui extends timesheet_bo { $preserv['old_pm_id'] = array_shift($links); } - if (!isset($this->data['pm_id']) && $preserv['old_pm_id']) + if ((!isset($this->data['pm_id']) || $this->data['pm_id'] === false) && $preserv['old_pm_id']) { $content['pm_id'] = $preserv['old_pm_id']; }