diff options
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 842dacff4..302b58595 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -301,21 +301,11 @@ use constant EXTRA_REQUIRED_FIELDS => qw(creation_ts target_milestone cc qa_cont ##################################################################### -# This and "new" catch every single way of creating a bug, so that we -# can call _create_cf_accessors. -sub _do_list_select { - my $invocant = shift; - $invocant->_create_cf_accessors(); - return $invocant->SUPER::_do_list_select(@_); -} - sub new { my $invocant = shift; my $class = ref($invocant) || $invocant; my $param = shift; - $class->_create_cf_accessors(); - # Remove leading "#" mark if we've just been passed an id. if (!ref $param && $param =~ /^#(\d+)$/) { $param = $1; @@ -363,6 +353,10 @@ sub new { return $self; } +sub initialize { + $_[0]->_create_cf_accessors(); +} + sub cache_key { my $class = shift; my $key = $class->SUPER::cache_key(@_) @@ -4316,6 +4310,16 @@ sub _multi_select_accessor { 1; +=head1 B<Methods> + +=over + +=item C<initialize> + +Ensures the accessors for custom fields are always created. + +=back + =head1 B<Methods in need of POD> =over |