From 46aba0e761e99db24b5de10f13bbc108fdc982a4 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Tue, 25 Oct 2005 02:21:02 +0000 Subject: Bug 313209: Oracle requires "CASE WHEN" around boolean expressions in the SELECT column list Patch By Lance Larsh r=mkanat, a=justdave --- Bugzilla/Bug.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index c08703789..d094b8eae 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -24,6 +24,7 @@ # Dave Miller # Max Kanat-Alexander # Frédéric Buclin +# Lance Larsh package Bugzilla::Bug; @@ -547,7 +548,8 @@ sub groups { my $grouplist = Bugzilla->user->groups_as_string; my $sth = $dbh->prepare( "SELECT DISTINCT groups.id, name, description," . - " bug_group_map.group_id IS NOT NULL," . + " CASE WHEN bug_group_map.group_id IS NOT NULL" . + " THEN 1 ELSE 0 END," . " CASE WHEN groups.id IN($grouplist) THEN 1 ELSE 0 END," . " isactive, membercontrol, othercontrol" . " FROM groups" . -- cgit v1.2.3-24-g4f1b