From b58b3a493234f65cf6fa3be589bd9bd4c707fb7d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Feb 2021 13:03:05 +0100 Subject: [PATCH] FIX link to create event when task is in a project with a thirdparty --- htdocs/projet/tasks/task.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index da15a73f66f..1ba2373f35d 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -650,7 +650,8 @@ if ($id > 0 || !empty($ref)) // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'task', $socid, 1, '', 10, 'withproject='.$withproject); + $defaultthirdpartyid = $socid > 0 ? $socid : $object->project->socid; + $formactions->showactions($object, 'task', $defaultthirdpartyid, 1, '', 10, 'withproject='.$withproject); print ''; }