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
4a2ceff5
Commit
4a2ceff5
authored
Jan 20, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 473052: Modify WebService::Bug.add_comment to return the new comment ID
Patch By Kip Hampton <khampton@totalcinema.com> r=mkanat, a=mkanat
parent
2e920979
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
Bug.pm
Bugzilla/WebService/Bug.pm
+19
-1
No files found.
Bugzilla/WebService/Bug.pm
View file @
4a2ceff5
...
...
@@ -337,11 +337,23 @@ sub add_comment {
# Append comment
$bug
->
add_comment
(
$comment
,
{
isprivate
=>
$params
->
{
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
();
# Send mail.
Bugzilla::BugMail::
Send
(
$bug
->
bug_id
,
{
changer
=>
Bugzilla
->
user
->
login
});
return
undef
;
return
{
id
=>
$self
->
type
(
'int'
,
$new_comment_id
)
};
}
1
;
...
...
@@ -977,6 +989,10 @@ be ignored.
=back
=item B<Returns>
A hash with one element, C<id> whose value is the id of the newly-created comment.
=item B<Errors>
=over
...
...
@@ -1002,6 +1018,8 @@ You did not have the necessary rights to edit the bug.
=item Added in Bugzilla B<3.2>.
=item Modified to return the new comment's id in Bugzilla B<3.4>
=back
=back
...
...
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