Skip to content

Commit

Permalink
#285 [Task] fix: task id in attribution action
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo David committed Jul 24, 2023
1 parent ab15783 commit 2b3931c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions view/timespent_range.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,8 @@
$action = 'assign_task';
$error = 0;

if ($taskID > 0) {
$result = $task->fetch($taskID);
if ($result < 0) {
$error++;
}
} else {
setEventMessages($langs->transnoentitiesnoconv('ErrorFieldRequired', $langs->transnoentitiesnoconv('Task')), [], 'errors');
$error++;
}
$result = $task->fetch($taskID);

if (!GETPOST('type')) {
setEventMessages($langs->transnoentitiesnoconv('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), [], 'errors');
$error++;
Expand Down

0 comments on commit 2b3931c

Please sign in to comment.