Fix project manager project completion not working correctly, and task
editor not preserving duration.
This commit is contained in:
parent
9a8f31cfc3
commit
a713e90d9b
2 changed files with 4 additions and 2 deletions
|
|
@ -10,6 +10,8 @@
|
|||
- fixed a bug where the calendar would break if a language other than English has
|
||||
been selected (Martin Kamerbeek / Procolix)
|
||||
- fix: Events Calendar: error in "big" template (Martin Kamerbeek / Procolix)
|
||||
- fix: PM task editor not preserving duration
|
||||
- fix: PM project completion percentage updates not working right
|
||||
|
||||
7.0.9
|
||||
- Removed the need for DateTime::Cron::Simple, which also added the ability
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ sub _updateProject {
|
|||
my ($minStart, $maxEnd) = $db->quickArray("select min(startDate), max(endDate) from PM_task where projectId=?", [$projectId]);
|
||||
my ($projectTotal, $complete) = 0;
|
||||
|
||||
my $tasks = $db->buildArrayRefOfHashRefs("select * from PM_task where projectId=? and taskType <> 'timed' order by sequenceNumber asc", [$projectId]);
|
||||
my $tasks = $db->buildArrayRefOfHashRefs("select * from PM_task where projectId=? and taskType = 'timed' order by sequenceNumber asc", [$projectId]);
|
||||
foreach my $task (@{$tasks}) {
|
||||
$projectTotal += $task->{duration};
|
||||
$complete += ($task->{duration} * ($task->{percentComplete}/100));
|
||||
|
|
@ -857,7 +857,7 @@ sub www_editTask {
|
|||
|
||||
my ($startEpoch, $endEpoch) = $db->quickArray('SELECT startDate, startDate FROM PM_task WHERE projectId = ? ORDER BY sequenceNumber LIMIT 1', [$projectId]);
|
||||
my $dependant = $task->{dependants};
|
||||
my $duration = $task->{duration} || ($taskType eq 'timed')? (($project->{durationUnits} eq 'hours')? $project->{hoursPerDay} : 1) : 0;
|
||||
my $duration = $task->{duration} || (($taskType eq 'timed')? (($project->{durationUnits} eq 'hours')? $project->{hoursPerDay} : 1) : 0);
|
||||
|
||||
$startEpoch = $endEpoch = time unless defined $startEpoch and defined $endEpoch;
|
||||
$startEpoch = $task->{startDate} if $task->{startDate};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue