Issue 2861: Documentation for REST API to add a review should be improved.
Status:  Released
Owner:
Closed:  Sep 2014
Reported by Hxq...@gmail.com, Aug 25, 2014
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version: 2.8 

Two ways to post the comments to code review:

1) REST API 

2) UI 

But there is difference!   For method 1, the comments are always on the top.  For method 2, the comments are near the commented lines 

why?  
Aug 25, 2014
#1 Hxq...@gmail.com
by the way, I mean multiple line comments
Aug 25, 2014
Project Member #2 david.pu...@sonymobile.com
Please confirm the REST API call that you are making.

Are you including the "line" parameter in the CommentInput entity [1] in the request data?

[1] https://gerrit-documentation.storage.googleapis.com/Documentation/2.8/rest-api-changes.html#comment-input

Status: AwaitingInformation
Aug 25, 2014
#3 xu...@yahoo-inc.com
Yes. I did include the line number. example. start line:10 end line:50

but the comments are on the top of Gerrit, not near the commented line. 


Aug 25, 2014
#4 xu...@yahoo-inc.com
when mouse over the comments, the corresponding lines can change color. That works well. Only the position has problems
Aug 25, 2014
Project Member #5 david.pu...@sonymobile.com
Please be more specific about the exact REST API call that you are making.

Are you setting the start_line, start_character, end_line and end_character values in the "range" entity, and also setting the "line" value to be equal to the "end_line" value, as described in the documentation?


Aug 25, 2014
#6 xu...@yahoo-inc.com
It works! thanks! 
Aug 25, 2014
Project Member #7 david.pu...@sonymobile.com
Looks like the API documentation needs to be updated with a better example.

Status: Accepted
Owner: david.pu...@sonymobile.com
Aug 25, 2014
Project Member #8 david.pu...@sonymobile.com
(No comment was entered for this change.)
Summary: Documentation for REST API to add a review should be improved. (was: review comments position are different )
Aug 25, 2014
Project Member #9 david.pu...@sonymobile.com
https://gerrit-review.googlesource.com/59592

Adds an example in the documentation.
Status: ChangeUnderReview
Aug 25, 2014
Project Member #10 david.pu...@sonymobile.com
https://gerrit-review.googlesource.com/59593

Changes the implementation so it's no longer necessary to specify "line" at the same time as "range".

Sep 10, 2014
Project Member #11 edwin.ke...@gmail.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.9.1
Sep 11, 2014
Project Member #12 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Released