diff options
author | mkanat%kerio.com <> | 2005-03-16 09:27:14 +0100 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-03-16 09:27:14 +0100 |
commit | b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb (patch) | |
tree | b2769bdde9c44eefd7834dcbc18e67e66d6d1aa9 /buglist.cgi | |
parent | 94dcd5edee079a1bb67a0011711d25a4be0f14c6 (diff) | |
download | bugzilla-b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb.tar.gz bugzilla-b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb.tar.xz |
Bug 174295: ANSI SQL requires all columns in SELECT to be in GROUP BY, unless they are in "aggregate" functions
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=joel, a=myk
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/buglist.cgi b/buglist.cgi index c401c43c2..d6567852b 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -475,9 +475,9 @@ DefineColumn("assigned_to" , "map_assigned_to.login_name" , "Assignee" DefineColumn("reporter" , "map_reporter.login_name" , "Reporter" ); DefineColumn("qa_contact" , "map_qa_contact.login_name" , "QA Contact" ); if ($format->{'extension'} eq 'html') { - DefineColumn("assigned_to_realname", "CASE WHEN map_assigned_to.realname = '' THEN map_assigned_to.login_name ELSE map_assigned_to.realname END", "Assignee" ); - DefineColumn("reporter_realname" , "CASE WHEN map_reporter.realname = '' THEN map_reporter.login_name ELSE map_reporter.realname END", "Reporter" ); - DefineColumn("qa_contact_realname" , "CASE WHEN map_qa_contact.realname = '' THEN map_qa_contact.login_name ELSE map_qa_contact.realname END", "QA Contact"); + DefineColumn("assigned_to_realname", "CASE WHEN map_assigned_to.realname = '' THEN map_assigned_to.login_name ELSE map_assigned_to.realname END AS assigned_to_realname", "Assignee" ); + DefineColumn("reporter_realname" , "CASE WHEN map_reporter.realname = '' THEN map_reporter.login_name ELSE map_reporter.realname END AS reporter_realname" , "Reporter" ); + DefineColumn("qa_contact_realname" , "CASE WHEN map_qa_contact.realname = '' THEN map_qa_contact.login_name ELSE map_qa_contact.realname END AS qa_contact_realname" , "QA Contact"); } else { DefineColumn("assigned_to_realname", "map_assigned_to.realname" , "Assignee" ); DefineColumn("reporter_realname" , "map_reporter.realname" , "Reporter" ); @@ -501,7 +501,7 @@ DefineColumn("remaining_time" , "bugs.remaining_time" , "Remaining Hou DefineColumn("actual_time" , "(SUM(ldtime.work_time)*COUNT(DISTINCT ldtime.bug_when)/COUNT(bugs.bug_id)) AS actual_time", "Actual Hours"); DefineColumn("percentage_complete","(100*((SUM(ldtime.work_time)*COUNT(DISTINCT ldtime.bug_when)/COUNT(bugs.bug_id))/((SUM(ldtime.work_time)*COUNT(DISTINCT ldtime.bug_when)/COUNT(bugs.bug_id))+bugs.remaining_time))) AS percentage_complete", "% Complete"); DefineColumn("relevance" , "relevance" , "Relevance" ); -DefineColumn("deadline" , $dbh->sql_date_format('bugs.deadline', '%Y-%m-%d'), "Deadline"); +DefineColumn("deadline" , $dbh->sql_date_format('bugs.deadline', '%Y-%m-%d') . " AS deadline", "Deadline"); ################################################################################ # Display Column Determination @@ -881,7 +881,7 @@ if (@bugidlist) { "AND group_control_map.group_id=bug_group_map.group_id " . "WHERE bugs.bug_id = bug_group_map.bug_id " . "AND bugs.bug_id IN (" . join(',',@bugidlist) . ") " . - "GROUP BY bugs.bug_id"); + $dbh->sql_group_by('bugs.bug_id')); $sth->execute(); while (my ($bug_id, $min_membercontrol) = $sth->fetchrow_array()) { $min_membercontrol{$bug_id} = $min_membercontrol; |