Skip to content

Commit

Permalink
Merge pull request #8 from altairisfr/emptytime
Browse files Browse the repository at this point in the history
dont create timesheet line if no duration
  • Loading branch information
nicolas-eoxia committed Nov 3, 2022
2 parents 1b2671d + 2cc5354 commit a888294
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf
$result = $ticket->fetch($object->fk_element);
dol_syslog(var_export($ticket, true), LOG_DEBUG);
if ($result > 0 && ($ticket->id) > 0) {
if (is_array($ticket->array_options) && array_key_exists('options_fk_task', $ticket->array_options) && $ticket->array_options['options_fk_task']>0) {
if (is_array($ticket->array_options) && array_key_exists('options_fk_task', $ticket->array_options) && $ticket->array_options['options_fk_task']>0 && !empty(GETPOST('timespent', 'int'))) {
require_once DOL_DOCUMENT_ROOT .'/projet/class/task.class.php';
$task = new Task($this->db);
$result = $task->fetch($ticket->array_options['options_fk_task']);
Expand Down

0 comments on commit a888294

Please sign in to comment.