# (see http://bugzilla.mozilla.org/show_bug.cgi?id=145588#c35).
my$select_term=
"(SUM($term1)/COUNT($term1) + $term2) AS relevance";
# add the column not used in aggregate function explicitly
# add the column not used in aggregate function explicitly
push(@groupby,'bugs.short_desc');
# Users can specify to display the relevance field, in which case
...
...
@@ -726,10 +726,15 @@ sub init {
my$table="longdescs_$chartid";
push(@supptables,"INNER JOIN longdescs AS $table ".
"ON $table.bug_id = bugs.bug_id");
my$field="(100*((SUM($table.work_time)*COUNT(DISTINCT $table.bug_when)/COUNT(bugs.bug_id))/((SUM($table.work_time)*COUNT(DISTINCT $table.bug_when)/COUNT(bugs.bug_id))+bugs.remaining_time))) AS percentage_complete_$table";