summaryrefslogtreecommitdiffstats
path: root/query.cgi
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2002-10-13 13:26:02 +0200
committerbugreport%peshkin.net <>2002-10-13 13:26:02 +0200
commitfd742d6fc8849328749866dbff2936d43abcc7d1 (patch)
tree1e4d7646a4589bcf44adceb452b38924286f7af1 /query.cgi
parentf61593bee73b37fc12caabbb2958b6515d688420 (diff)
downloadbugzilla-fd742d6fc8849328749866dbff2936d43abcc7d1.tar.gz
bugzilla-fd742d6fc8849328749866dbff2936d43abcc7d1.tar.xz
Bug 24789 [E|A|R] Add Estimated, Actual, Remaining Time Fields
patch by jeff.hedlund@matrixsi.com 2xr=joel,justdave
Diffstat (limited to 'query.cgi')
-rwxr-xr-xquery.cgi18
1 files changed, 17 insertions, 1 deletions
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 });
}