summaryrefslogtreecommitdiffstats
path: root/extensions/TrackingFlags/lib/Flag.pm
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/TrackingFlags/lib/Flag.pm')
-rw-r--r--extensions/TrackingFlags/lib/Flag.pm6
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};