Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
c76e2cc1
Commit
c76e2cc1
authored
Dec 17, 2014
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1111043: Bug.add_comment returns the wrong comment ID
r/a=dkl
parent
707773ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
Bug.pm
Bugzilla/WebService/Bug.pm
+3
-12
No files found.
Bugzilla/WebService/Bug.pm
View file @
c76e2cc1
...
...
@@ -952,19 +952,10 @@ sub add_comment {
# Append comment
$bug
->
add_comment
(
$comment
,
{
isprivate
=>
$params
->
{
is_private
},
work_time
=>
$params
->
{
work_time
}
});
# Capture the call to bug->update (which creates the new comment) in
# a transaction so we're sure to get the correct comment_id.
my
$dbh
=
Bugzilla
->
dbh
;
$dbh
->
bz_start_transaction
();
$bug
->
update
();
my
$new_comment_id
=
$dbh
->
bz_last_key
(
'longdescs'
,
'comment_id'
);
$dbh
->
bz_commit_transaction
();
my
$new_comment_id
=
$bug
->
{
added_comments
}[
0
]
->
id
;
# Send mail.
Bugzilla::BugMail::
Send
(
$bug
->
bug_id
,
{
changer
=>
$user
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment