diff options
author | David Lawrence <dkl@mozilla.com> | 2014-03-20 20:55:57 +0100 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-03-20 20:55:57 +0100 |
commit | 9f18c2a6cf47e328fec681432633fafae46d0be1 (patch) | |
tree | 0bc6bac8aec4c772945e66deeceed23e794b75e0 /post_bug.cgi | |
parent | ca7b39aa66be9b4deea1ead8e6a788025759b80d (diff) | |
download | bugzilla-9f18c2a6cf47e328fec681432633fafae46d0be1.tar.gz bugzilla-9f18c2a6cf47e328fec681432633fafae46d0be1.tar.xz |
Bug 513212 - Allow people to set "See Also" when filing/creating/entering a bug on enter_bug.cgi or the Bug.create webservice
r/a=glob
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index 24fa331b4..782bb2293 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -22,6 +22,8 @@ use Bugzilla::Hook; use Bugzilla::Token; use Bugzilla::Flag; +use List::MoreUtils qw(uniq); + my $user = Bugzilla->login(LOGIN_REQUIRED); my $cgi = Bugzilla->cgi; @@ -101,7 +103,7 @@ push(@bug_fields, qw( version target_milestone status_whiteboard - + see_also estimated_time deadline )); @@ -204,12 +206,21 @@ my $bug_sent = Bugzilla::BugMail::Send($id, $recipients); $bug_sent->{type} = 'created'; $bug_sent->{id} = $id; my @all_mail_results = ($bug_sent); + foreach my $dep (@{$bug->dependson || []}, @{$bug->blocked || []}) { my $dep_sent = Bugzilla::BugMail::Send($dep, $recipients); $dep_sent->{type} = 'dep'; $dep_sent->{id} = $dep; push(@all_mail_results, $dep_sent); } + +# Sending emails for any referenced bugs. +foreach my $ref_bug_id (uniq @{ $bug->{see_also_changes} || [] }) { + my $ref_sent = Bugzilla::BugMail::Send($ref_bug_id, $recipients); + $ref_sent->{id} = $ref_bug_id; + push(@all_mail_results, $ref_sent); +} + $vars->{sentmail} = \@all_mail_results; $format = $template->get_format("bug/create/created", |