Anonymous Login
2020-08-09 03:45 PDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001034Pending Requests[All Projects] Generalpublic2012-08-10 23:37
Assigned To 
Product Version 
Target VersionFixed in Version 
Summary0001034: Task logs doesn't update Task's progress and Time worked
DescriptionWhen a task log is created the progress is not updated in the task neither the time worked.
TagsNo tags attached.
Attached Files

duplicate of 0001002closedcaseydk v3.0 Release % on Progress of Parent tasks not updated when there are nested dynamic tasks 
duplicate of 0000998closedcaseydk v3.0 Release Dynamic tasks at 



carlosandrsn (reporter)

looking at the files I found that:

File: ..\modules\tasks\tasklogs.class.php

Lines 280 - 287

 * TODO: In theory, we shouldn't just use the task_log_task_end_date,
 * because if we're after that date and someone is still adding
 * logs to a task, obviously the task isn't complete. We may want
 * to check to see if task_log_date > task_log_task_end_date and
 * use the later one as the end date.. not sure yet.

 $taskEndDate = $results['task_log_task_end_date'];

that cause an error when the log's progress < 100% so I simply comment that line:

 $taskEndDate = $results['task_log_task_end_date'];

and modify the line 296:

 $task->task_end_date = $taskEndDate;

to ensure $taskEndDate is not null:

  if( !is_null($taskEndDate) ){
     $task->task_end_date = $taskEndDate;

That solve the update of progress


carlosandrsn (reporter)

later on the same file in line 308:

$q->addWhere('task_log_task = ' . (int)$task_log_task);
$totalHours = $q->loadResult();

there is an error setting the task id, must be replaced to:

$q->addWhere('task_log_task = ' . (int)$task_id);
$totalHours = $q->loadResult();

that solve the time worked update on the task.


carlosandrsn (reporter)

the original and the fixed file are now attached to the issue.

the original file looks like a beta.

I hope this will serve to someone else


caseydk (administrator)

This is already closed under the v3.0 development and should be released soon.

-Issue History
Date Modified Username Field Change
2011-12-14 10:25 carlosandrsn New Issue
2011-12-14 10:38 carlosandrsn Note Added: 0002352
2011-12-14 10:40 carlosandrsn Note Added: 0002353
2011-12-14 10:42 carlosandrsn File Added: tasklogs.class.php 2.4.0 original
2011-12-14 10:43 carlosandrsn File Added: tasklogs.class.php fixed
2011-12-14 10:45 carlosandrsn Note Added: 0002355
2011-12-23 09:08 caseydk Project v2.4 Release (Closed) => v3.0 Release
2011-12-23 09:13 caseydk Relationship added duplicate of 0001002
2011-12-23 09:13 caseydk Relationship added duplicate of 0000998
2011-12-23 09:13 caseydk Note Added: 0002363
2011-12-23 09:13 caseydk Status new => closed
2011-12-23 09:13 caseydk Resolution open => fixed
2012-08-10 23:37 caseydk Project v3.0 Release => Pending Requests
+Issue History