diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-10-13 07:15:28 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-10-13 07:15:28 +0200 |
commit | 765cb4c609d25b47bb20e8e33611ddf3f637b691 (patch) | |
tree | a2819a2e55244fa37865a313ed106db51c7511f4 /extensions/TrackingFlags | |
parent | 0e52c06f2069cb5413abce39d6249bac73f045c8 (diff) | |
download | bugzilla-765cb4c609d25b47bb20e8e33611ddf3f637b691.tar.gz bugzilla-765cb4c609d25b47bb20e8e33611ddf3f637b691.tar.xz |
Bug 926142 - Can't call method "is_active" on unblessed reference when loading certain bugs that have flags set but are no longer visible
Diffstat (limited to 'extensions/TrackingFlags')
-rw-r--r-- | extensions/TrackingFlags/lib/Flag.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extensions/TrackingFlags/lib/Flag.pm b/extensions/TrackingFlags/lib/Flag.pm index aa3649643..08886c267 100644 --- a/extensions/TrackingFlags/lib/Flag.pm +++ b/extensions/TrackingFlags/lib/Flag.pm @@ -282,6 +282,12 @@ sub preload_all_the_things { foreach my $obj (@$bug_objects) { my $flag_id = $obj->tracking_flag_id; + # Load the flag object if it does not yet exist. + # This can happen if the bug value tracking flag + # is no longer visible for the product/component + $flag_hash{$flag_id} + ||= Bugzilla::Extension::TrackingFlags::Flag->new($flag_id); + # Prepopulate the tracking flag object in the bug flag object $obj->{'tracking_flag'} = $flag_hash{$flag_id}; |