From 612ad473bb85bb731a9b7363aada6c670b05beef Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" Date: Tue, 19 Nov 2002 23:35:53 +0000 Subject: [PATCH] Bug 180978 - Adding keyword from enter_bug doesn't update keyword cache r=myk, a=justdave --- webtools/bugzilla/post_bug.cgi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/webtools/bugzilla/post_bug.cgi b/webtools/bugzilla/post_bug.cgi index 4f4063f0458b..60bfa0522370 100755 --- a/webtools/bugzilla/post_bug.cgi +++ b/webtools/bugzilla/post_bug.cgi @@ -409,6 +409,18 @@ if (UserInGroup("editbugs")) { SendSQL("INSERT INTO keywords (bug_id, keywordid) VALUES ($id, $keyword)"); } + if (@keywordlist) { + # Make sure that we have the correct case for the kw + SendSQL("SELECT name FROM keyworddefs WHERE id IN ( " . + join(',', @keywordlist) . ")"); + my @list; + while (MoreSQLData()) { + push (@list, FetchOneColumn()); + } + SendSQL("UPDATE bugs SET keywords = " . + SqlQuote(join(', ', @list)) . + " WHERE bug_id = $id"); + } if (defined $::FORM{'dependson'}) { my $me = "blocked"; my $target = "dependson";