From fd742d6fc8849328749866dbff2936d43abcc7d1 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Sun, 13 Oct 2002 11:26:02 +0000 Subject: Bug 24789 [E|A|R] Add Estimated, Actual, Remaining Time Fields patch by jeff.hedlund@matrixsi.com 2xr=joel,justdave --- query.cgi | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'query.cgi') diff --git a/query.cgi b/query.cgi index 1aa17b723..973d1fdbc 100755 --- a/query.cgi +++ b/query.cgi @@ -281,7 +281,16 @@ shift @::legal_resolution; # Another hack - this array contains "" for some reason. See bug 106589. $vars->{'resolution'} = \@::legal_resolution; -$vars->{'chfield'} = ["[Bug creation]", @::log_columns]; +my @chfields = @::log_columns; +push @chfields, "[Bug creation]"; +if (UserInGroup(Param('timetrackinggroup'))) { + push @chfields, "work_time"; +} else { + @chfields = grep($_ ne "estimated_time", @chfields); + @chfields = grep($_ ne "remaining_time", @chfields); +} +@chfields = (sort(@chfields)); +$vars->{'chfield'} = \@chfields; $vars->{'bug_status'} = \@::legal_bug_status; $vars->{'rep_platform'} = \@::legal_platform; $vars->{'op_sys'} = \@::legal_opsys; @@ -295,6 +304,13 @@ push(@fields, { name => "noop", description => "---" }); SendSQL("SELECT name, description FROM fielddefs ORDER BY sortkey"); while (MoreSQLData()) { my ($name, $description) = FetchSQLData(); + if (($name eq "estimated_time" || + $name eq "remaining_time" || + $name eq "work_time" || + $name eq "percentage_complete" ) && + (!UserInGroup(Param('timetrackinggroup')))) { + next; + } push(@fields, { name => $name, description => $description }); } -- cgit v1.2.3-24-g4f1b