diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-08 16:22:08 -0700 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-08 16:22:08 -0700 |
commit | d500177f7ce877bf1f535df96c1231651355e199 (patch) | |
tree | 4d27450f7ea936a7c615e4d3714d0bddf4f87b3d | |
parent | 2e756dd204328d22836054cbc726a53ca222faa8 (diff) | |
download | bugs-d500177f7ce877bf1f535df96c1231651355e199.tar bugs-d500177f7ce877bf1f535df96c1231651355e199.tar.gz bugs-d500177f7ce877bf1f535df96c1231651355e199.tar.bz2 bugs-d500177f7ce877bf1f535df96c1231651355e199.tar.xz bugs-d500177f7ce877bf1f535df96c1231651355e199.zip |
Bug 577575: If percentage_complete is a column in the buglist, remaining_time
must also be selected from the database for PostgreSQL.
r=mkanat, a=mkanat (module owner)
-rw-r--r-- | Bugzilla/Search.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index b7c2f06ba..68144b376 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -538,6 +538,15 @@ sub init { push(@supptables, "LEFT JOIN keywords ON keywords.bug_id = bugs.bug_id"); push(@supptables, "LEFT JOIN keyworddefs ON keyworddefs.id = keywords.keywordid"); } + + # Calculating percentage_complete requires remaining_time. Mostly, + # we just need remaining_time in the GROUP_BY, but it simplifies + # things to just add it in the SELECT. + if (grep($_ eq 'percentage_complete', @fields) + and !grep($_ eq 'remaining_time', @fields)) + { + push(@fields, 'remaining_time'); + } # If the user has selected all of either status or resolution, change to # selecting none. This is functionally equivalent, but quite a lot faster. |