Skip to content
Snippets Groups Projects
Commit 1e473839 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: visible task into area "time" for "My task" must limit task to

tasks i am assigned to.
parent 1016e05f
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,8 @@ if ($action == 'addtimespent' && $user->rights->projet->creer) ...@@ -65,7 +65,8 @@ if ($action == 'addtimespent' && $user->rights->projet->creer)
} }
if (empty($_POST["userid"])) if (empty($_POST["userid"]))
{ {
setEventMessage($langs->trans('ErrorUserNotAffectedToTask'),'errors'); $langs->load("errors");
setEventMessage($langs->trans('ErrorUserNotAssignedToTask'),'errors');
$error++; $error++;
} }
...@@ -337,9 +338,13 @@ if ($id > 0 || ! empty($ref)) ...@@ -337,9 +338,13 @@ if ($id > 0 || ! empty($ref))
// Contributor // Contributor
print '<td class="nowrap">'; print '<td class="nowrap">';
$contactoftask=$object->getListContactId('internal'); $restrictaddtimetocontactoftask=0;
if (empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS))
{
$restrictaddtimetocontactoftask=$object->getListContactId('internal');
}
print img_object('','user'); print img_object('','user');
print $form->select_dolusers($_POST["userid"]?$_POST["userid"]:$user->id,'userid',0,'',0,'',$contactoftask); print $form->select_dolusers($_POST["userid"]?$_POST["userid"]:$user->id,'userid',0,'',0,'',$restrictaddtimetocontactoftask); // Note: If user is not allowed it will be disabled into combo list and userid not posted
print '</td>'; print '</td>';
// Note // Note
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment