summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorGervase Markham <gerv@gerv.net>2014-03-21 11:26:52 +0100
committerGervase Markham <gerv@gerv.net>2014-03-21 11:26:52 +0100
commite477b10a327c55ab88f8edb5991a1214670716b1 (patch)
treeeef6a6391942dd6faa2e8c864f7840fc54cd7ef8 /Bugzilla
parent9cd13d0ccbf870f53264a6cc0ea37a3097261ec6 (diff)
parent9f18c2a6cf47e328fec681432633fafae46d0be1 (diff)
downloadbugzilla-e477b10a327c55ab88f8edb5991a1214670716b1.tar.gz
bugzilla-e477b10a327c55ab88f8edb5991a1214670716b1.tar.xz
Merge branch 'master' of ssh://git.mozilla.org/bugzilla/bugzilla
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Bug.pm20
-rw-r--r--Bugzilla/WebService/Bug.pm3
2 files changed, 22 insertions, 1 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index f05533d25..b53847790 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -652,6 +652,7 @@ sub create {
my $blocked = delete $params->{blocked};
my $keywords = delete $params->{keywords};
my $creation_comment = delete $params->{comment};
+ my $see_also = delete $params->{see_also};
# We don't want the bug to appear in the system until it's correctly
# protected by groups.
@@ -715,6 +716,25 @@ sub create {
}
}
+ # Insert any see_also values
+ if ($see_also) {
+ my $see_also_array = $see_also;
+ if (!ref $see_also_array) {
+ $see_also = trim($see_also);
+ $see_also_array = [ split(/[\s,]+/, $see_also) ];
+ }
+ foreach my $value (@$see_also_array) {
+ $bug->add_see_also($value);
+ }
+ foreach my $see_also (@{ $bug->see_also }) {
+ $see_also->insert_create_data($see_also);
+ }
+ foreach my $ref_bug (@{ $bug->{_update_ref_bugs} || [] }) {
+ $ref_bug->update();
+ }
+ delete $bug->{_update_ref_bugs};
+ }
+
# Comment #0 handling...
# We now have a bug id so we can fill this out
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 7c6547de9..09f6e1adc 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -717,7 +717,8 @@ sub create {
$dbh->bz_commit_transaction();
- Bugzilla::BugMail::Send($bug->bug_id, { changer => $bug->reporter });
+ $bug->send_changes();
+
return { id => $self->type('int', $bug->bug_id) };
}