summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/globals.pl b/globals.pl
index 9c36e9003..d8d11be53 100644
--- a/globals.pl
+++ b/globals.pl
@@ -627,6 +627,26 @@ sub GetSelectableProductHash {
}
+sub GetFieldDefs {
+ my $extra = "";
+ if (!UserInGroup(Param('timetrackinggroup'))) {
+ $extra = "WHERE name NOT IN ('estimated time', 'remaining_time', " .
+ "'work_time', 'percentage_complete')";
+ }
+
+ my @fields;
+ PushGlobalSQLState();
+ SendSQL("SELECT name, description FROM fielddefs $extra ORDER BY sortkey");
+ while (MoreSQLData()) {
+ my ($name, $description) = FetchSQLData();
+ push(@fields, { name => $name, description => $description });
+ }
+ PopGlobalSQLState();
+
+ return(@fields);
+}
+
+
sub CanSeeBug {
my ($id, $userid) = @_;