diff options
author | mkanat%kerio.com <> | 2005-02-25 11:19:45 +0000 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-02-25 11:19:45 +0000 |
commit | 8abd408e9df8b90db224b77cd53f7b4b375803c4 (patch) | |
tree | b72289ab44af5e26b1bc1822851509a5bde5e3f4 | |
parent | Bug 277504 : quips migrated from quip file have an (invalid) userid of 0 (diff) | |
download | bugzilla-8abd408e9df8b90db224b77cd53f7b4b375803c4.tar.gz bugzilla-8abd408e9df8b90db224b77cd53f7b4b375803c4.tar.bz2 bugzilla-8abd408e9df8b90db224b77cd53f7b4b375803c4.zip |
Bug 279910: Query crashed with Software Error: "Unknown column 'bugs.assignee_accessible' "
Patch By Frederic Buclin <LpSolit@gmail.com> r=myk, a=myk
-rwxr-xr-x | checksetup.pl | 25 | ||||
-rw-r--r-- | globals.pl | 5 |
2 files changed, 21 insertions, 9 deletions
diff --git a/checksetup.pl b/checksetup.pl index c0759d562..8cc173b1f 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -3197,14 +3197,12 @@ if (GetFieldDef('bugs_activity', 'oldvalue')) { # http://bugzilla.mozilla.org/show_bug.cgi?id=90933 ChangeFieldType("profiles", "disabledtext", "mediumtext not null"); -# 2001-07-26 myk@mozilla.org bug39816: -# Add fields to the bugs table that record whether or not the reporter, -# assignee, QA contact, and users on the cc: list can see bugs even when +# 2001-07-26 myk@mozilla.org bug 39816 (original) +# 2002-02-06 bbaetz@student.usyd.edu.au bug 97471 (revision) +# Add fields to the bugs table that record whether or not the reporter +# and users on the cc: list can see bugs even when # they are not members of groups to which the bugs are restricted. -# 2002-02-06 bbaetz@student.usyd.edu.au - assignee/qa can always see the bug AddField("bugs", "reporter_accessible", "tinyint not null default 1"); -#AddField("bugs", "assignee_accessible", "tinyint not null default 1"); -#AddField("bugs", "qacontact_accessible", "tinyint not null default 1"); AddField("bugs", "cclist_accessible", "tinyint not null default 1"); # 2001-08-21 myk@mozilla.org bug84338: @@ -4092,7 +4090,20 @@ if (GetFieldDef("user_group_map", "isderived")) { AddField('flags', 'is_active', 'tinyint not null default 1'); - +# 2005-02-21 - LpSolit@gmail.com - Bug 279910 +# qacontact_accessible and assignee_accessible field names no longer exist +# in the 'bugs' table. Their corresponding entries in the 'bugs_activity' +# table should therefore be marked as obsolete, meaning that they cannot +# be used anymore when querying the database - they are not deleted in +# order to keep track of these fields in the activity table. +if (!GetFieldDef('fielddefs', 'obsolete')) { + AddField('fielddefs', 'obsolete', 'tinyint not null default 0'); + print "Marking qacontact_accessible and assignee_accessible as obsolete fields...\n"; + $dbh->do("UPDATE fielddefs SET obsolete = 1 + WHERE name = 'qacontact_accessible' + OR name = 'assignee_accessible'"); +} + # 2005-02-20 - LpSolit@gmail.com - Bug 277504 # When migrating quips from the '$datadir/comments' file to the DB, diff --git a/globals.pl b/globals.pl index eb8169e72..4f607ad22 100644 --- a/globals.pl +++ b/globals.pl @@ -614,13 +614,14 @@ sub GetSelectableProductHash { sub GetFieldDefs { my $extra = ""; if (!UserInGroup(Param('timetrackinggroup'))) { - $extra = "WHERE name NOT IN ('estimated time', 'remaining_time', " . + $extra = "AND name NOT IN ('estimated_time', 'remaining_time', " . "'work_time', 'percentage_complete')"; } my @fields; PushGlobalSQLState(); - SendSQL("SELECT name, description FROM fielddefs $extra ORDER BY sortkey"); + SendSQL("SELECT name, description FROM fielddefs " . + "WHERE obsolete = 0 $extra ORDER BY sortkey"); while (MoreSQLData()) { my ($name, $description) = FetchSQLData(); push(@fields, { name => $name, description => $description }); |