summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-08-26 18:05:05 +0200
committerByron Jones <bjones@mozilla.com>2013-08-26 18:05:05 +0200
commite9a140e61d6fb160098a38657daf9476d8fd6950 (patch)
tree34227f70408623ad6a2d3e8e9fa1b2c9ac93dbcc /Bugzilla/Bug.pm
parent5bc153d05e012c37e9bc0d9916cc7ccfefc0fec7 (diff)
downloadbugzilla-e9a140e61d6fb160098a38657daf9476d8fd6950.tar.gz
bugzilla-e9a140e61d6fb160098a38657daf9476d8fd6950.tar.xz
Bug 904568: emails generated by jobqueue.pl unable to reference custom fields
r=simon, a=simon
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm24
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