Skip to content

Commit 76c3a58

Browse files
author
myk%mozilla.org
committed
Backing out fix for bug 287325 (initial implementation of custom fields): turns out the tree is not yet open for 2.24 checkins after all. I'll check this back in once the tree opens for 2.24 checkins, which lpsolit says will be in about a month.
1 parent 199d6ed commit 76c3a58

16 files changed

Lines changed: 48 additions & 497 deletions

Bugzilla.pm

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ use Bugzilla::Template;
3535
use Bugzilla::User;
3636
use Bugzilla::Error;
3737
use Bugzilla::Util;
38-
use Bugzilla::Field;
3938

4039
use File::Basename;
4140

@@ -277,17 +276,6 @@ sub switch_to_main_db {
277276
return $class->dbh;
278277
}
279278

280-
sub get_fields {
281-
my $class = shift;
282-
my $criteria = shift;
283-
return Bugzilla::Field::match($criteria);
284-
}
285-
286-
sub custom_field_names {
287-
# Get a list of custom fields and convert it into a list of their names.
288-
return map($_->{name}, Bugzilla::Field::match({ custom=>1, obsolete=>0 }));
289-
}
290-
291279
# Private methods
292280

293281
# Per process cleanup

Bugzilla/Bug.pm

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ sub fields {
9090
push @fields, qw(estimated_time remaining_time actual_time deadline);
9191
}
9292

93-
push(@fields, Bugzilla->custom_field_names);
94-
9593
return @fields;
9694
}
9795

@@ -164,11 +162,6 @@ sub initBug {
164162

165163
$self->{'who'} = new Bugzilla::User($user_id);
166164

167-
my $custom_fields = "";
168-
if (length(Bugzilla->custom_field_names) > 0) {
169-
$custom_fields = ", " . join(", ", Bugzilla->custom_field_names);
170-
}
171-
172165
my $query = "
173166
SELECT
174167
bugs.bug_id, alias, products.classification_id, classifications.name,
@@ -182,8 +175,7 @@ sub initBug {
182175
delta_ts, COALESCE(SUM(votes.vote_count), 0),
183176
reporter_accessible, cclist_accessible,
184177
estimated_time, remaining_time, " .
185-
$dbh->sql_date_format('deadline', '%Y-%m-%d') .
186-
$custom_fields . "
178+
$dbh->sql_date_format('deadline', '%Y-%m-%d') . "
187179
FROM bugs
188180
LEFT JOIN votes
189181
ON bugs.bug_id = votes.bug_id
@@ -220,8 +212,7 @@ sub initBug {
220212
"target_milestone", "qa_contact_id", "status_whiteboard",
221213
"creation_ts", "delta_ts", "votes",
222214
"reporter_accessible", "cclist_accessible",
223-
"estimated_time", "remaining_time", "deadline",
224-
Bugzilla->custom_field_names)
215+
"estimated_time", "remaining_time", "deadline")
225216
{
226217
$fields{$field} = shift @row;
227218
if (defined $fields{$field}) {

Bugzilla/Constants.pm

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ use base qw(Exporter);
9191
ADMIN_GROUP_NAME
9292
9393
SENDMAIL_EXE
94-
95-
FIELD_TYPE_UNKNOWN
96-
FIELD_TYPE_FREETEXT
9794
);
9895

9996
@Bugzilla::Constants::EXPORT_OK = qw(contenttypes);
@@ -246,14 +243,4 @@ use constant ADMIN_GROUP_NAME => 'admin';
246243
# Path to sendmail.exe (Windows only)
247244
use constant SENDMAIL_EXE => '/usr/lib/sendmail.exe';
248245

249-
# Field types. Match values in fielddefs.type column. These are purposely
250-
# not named after database column types, since Bugzilla fields comprise not
251-
# only storage but also logic. For example, we might add a "user" field type
252-
# whose values are stored in an integer column in the database but for which
253-
# we do more than we would do for a standard integer type (f.e. we might
254-
# display a user picker).
255-
256-
use constant FIELD_TYPE_UNKNOWN => 0;
257-
use constant FIELD_TYPE_FREETEXT => 1;
258-
259246
1;

Bugzilla/DB/Schema.pm

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ package Bugzilla::DB::Schema;
3636
use strict;
3737
use Bugzilla::Error;
3838
use Bugzilla::Util;
39-
use Bugzilla::Constants;
4039

4140
use Safe;
4241
# Historical, needed for SCHEMA_VERSION = '1.00'
@@ -454,10 +453,6 @@ use constant ABSTRACT_SCHEMA => {
454453
fieldid => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1,
455454
PRIMARYKEY => 1},
456455
name => {TYPE => 'varchar(64)', NOTNULL => 1},
457-
type => {TYPE => 'INT2', NOTNULL => 1,
458-
DEFAULT => FIELD_TYPE_UNKNOWN},
459-
custom => {TYPE => 'BOOLEAN', NOTNULL => 1,
460-
DEFAULT => 'FALSE'},
461456
description => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
462457
mailhead => {TYPE => 'BOOLEAN', NOTNULL => 1,
463458
DEFAULT => 'FALSE'},

0 commit comments

Comments
 (0)