We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 707773a commit c76e2ccCopy full SHA for c76e2cc
Bugzilla/WebService/Bug.pm
@@ -952,19 +952,10 @@ sub add_comment {
952
# Append comment
953
$bug->add_comment($comment, { isprivate => $params->{is_private},
954
work_time => $params->{work_time} });
955
-
956
- # Capture the call to bug->update (which creates the new comment) in
957
- # a transaction so we're sure to get the correct comment_id.
958
959
- my $dbh = Bugzilla->dbh;
960
- $dbh->bz_start_transaction();
961
962
$bug->update();
963
964
- my $new_comment_id = $dbh->bz_last_key('longdescs', 'comment_id');
965
966
- $dbh->bz_commit_transaction();
967
+
+ my $new_comment_id = $bug->{added_comments}[0]->id;
968
# Send mail.
969
Bugzilla::BugMail::Send($bug->bug_id, { changer => $user });
970
0 commit comments