summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/Extension.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index 604de68cb..458be737f 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -1390,6 +1390,7 @@ sub _post_dev_engagement {
Bugzilla->error_mode(ERROR_MODE_DIE);
my $discussion_bug;
+ my @warnings;
eval {
# Add attachment containing tab delimited field values for
# spreadsheet import.
@@ -1485,6 +1486,12 @@ EOF
foreach my $type (@{ $discussion_bug->flag_types }) {
next if $type->name ne 'needinfo';
foreach my $requestee (DEV_ENGAGE_DISCUSS_NEEDINFO()) {
+ # needinfo'ing a disable account throws an error - warn instead
+ my $requestee_object = Bugzilla::User->new({ name => $requestee, cache => 1 });
+ if (!$requestee_object || !$requestee_object->is_enabled) {
+ push @warnings, "Failed to needinfo $requestee on dev-engagement bug (does not exist or disabled)";
+ next;
+ }
my $needinfo_flag = {
type_id => $type->id,
status => '?',
@@ -1508,6 +1515,10 @@ EOF
Bugzilla->set_user($old_user);
Bugzilla->error_mode($error_mode_cache);
+ foreach my $warning (@warnings) {
+ warn $warning . "\n";
+ }
+
# No matter what happened, ensure the parent bug gets marked as updated
# There's no need to send mail for parent bug
$parent_bug->update($parent_bug->creation_ts);