Commit 27749749 authored by kiko%async.com.br's avatar kiko%async.com.br

Fix for bug 253562: Hours Worked (actual_time) is being listed as 1.

Cleans up Bugzilla::Bug::actual_time to do things the right way (dbi, Bugzilla->user) and apparently fixes a problem limited to some platforms. r=joel, a=justdave.
parent 1e04722b
......@@ -289,12 +289,13 @@ sub actual_time {
return $self->{'actual_time'} if exists $self->{'actual_time'};
if (&::UserInGroup(Param("timetrackinggroup"))) {
&::SendSQL("SELECT SUM(work_time)
FROM longdescs WHERE longdescs.bug_id=$self->{bug_id}");
$self->{'actual_time'} = &::FetchSQLData();
}
return undef unless Bugzilla->user->in_group(Param("timetrackinggroup"));
my $sth = Bugzilla->dbh->prepare("SELECT SUM(work_time)
FROM longdescs
WHERE longdescs.bug_id=?");
$sth->execute($self->{bug_id});
$self->{'actual_time'} = $sth->fetchrow_array();
return $self->{'actual_time'};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment