diff options
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 15272e542..d974d8aa0 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -80,7 +80,8 @@ use constant AUDIT_UPDATES => 0; # This is a sub because it needs to call other subroutines. sub DB_COLUMNS { my $dbh = Bugzilla->dbh; - my @custom = grep {$_->type != FIELD_TYPE_MULTI_SELECT} + my @custom = grep {$_->type != FIELD_TYPE_MULTI_SELECT + && $_->type != FIELD_TYPE_EXTENSION} Bugzilla->active_custom_fields; my @custom_names = map {$_->name} @custom; @@ -114,9 +115,9 @@ sub DB_COLUMNS { $dbh->sql_date_format('creation_ts', '%Y.%m.%d %H:%i') . ' AS creation_ts', $dbh->sql_date_format('deadline', '%Y-%m-%d') . ' AS deadline', @custom_names); - + Bugzilla::Hook::process("bug_columns", { columns => \@columns }); - + return @columns; } @@ -214,7 +215,8 @@ sub VALIDATOR_DEPENDENCIES { }; sub UPDATE_COLUMNS { - my @custom = grep {$_->type != FIELD_TYPE_MULTI_SELECT} + my @custom = grep {$_->type != FIELD_TYPE_MULTI_SELECT + && $_->type != FIELD_TYPE_EXTENSION} Bugzilla->active_custom_fields; my @custom_names = map {$_->name} @custom; my @columns = qw( @@ -2334,7 +2336,8 @@ sub set_all { $self->_add_remove($params, 'see_also'); # And set custom fields. - my @custom_fields = Bugzilla->active_custom_fields; + my @custom_fields = grep { $_->type != FIELD_TYPE_EXTENSION } + Bugzilla->active_custom_fields; foreach my $field (@custom_fields) { my $fname = $field->name; if (exists $params->{$fname}) { @@ -3830,6 +3833,9 @@ sub editable_bug_fields { # Ensure field exists before attempting to remove it. splice(@fields, $location, 1) if ($location > -1); } + + Bugzilla::Hook::process('bug_editable_bug_fields', { fields => \@fields }); + # Sorted because the old @::log_columns variable, which this replaces, # was sorted. return sort(@fields); @@ -4344,6 +4350,7 @@ sub _create_cf_accessors { my $fields = Bugzilla->fields({ custom => 1 }); foreach my $field (@$fields) { + next if $field->type == FIELD_TYPE_EXTENSION; my $accessor = $class->_accessor_for($field); my $name = "${class}::" . $field->name; { @@ -4353,6 +4360,8 @@ sub _create_cf_accessors { } } + Bugzilla::Hook::process('bug_create_cf_accessors'); + Bugzilla->request_cache->{"${class}_cf_accessors_created"} = 1; } |