From 812af0321244c41a21f5f280120a0b411cdf1f39 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 16 Dec 2014 10:13:56 +0800 Subject: Bug 1105745: changes made via the bounty form are not emailed immediately --- extensions/BMO/Extension.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'extensions/BMO') diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index e776b320b..b4ff1b01d 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -25,6 +25,7 @@ package Bugzilla::Extension::BMO; use strict; use base qw(Bugzilla::Extension); +use Bugzilla::BugMail; use Bugzilla::Constants; use Bugzilla::Error; use Bugzilla::Field; @@ -199,7 +200,8 @@ sub page_before_template { sub bounty_attachment { my ($vars) = @_; - Bugzilla->user->in_group('bounty-team') + my $user = Bugzilla->user; + $user->in_group('bounty-team') || ThrowUserError("auth_failure", { group => "bounty-team", action => "add", object => "bounty_attachments" }); @@ -237,6 +239,8 @@ sub bounty_attachment { } $dbh->bz_commit_transaction(); + Bugzilla::BugMail::Send($bug->id, { changer => $user }); + print Bugzilla->cgi->redirect('show_bug.cgi?id=' . $bug->id); exit; } -- cgit v1.2.3-24-g4f1b