Issue 2913: Gerrit GET review REST api returns incomplete revision data
Status:  Submitted
Owner: ----
Closed:  Nov 2014
Project Member Reported by zaro0508, Sep 18, 2014
Affected Version: can repo on 2.8 and master (2.11-SNAPSHOT)

What steps will reproduce the problem?
1. build gerrit master and the download command plugin
2. create a gerrit site
3. install the download command plugin
4. create a new change
5. review the change
6. use the GET review rest API to get the data for the change [a]

[a] curl http://localhost:8080/changes/{change-id}/revisions/1/review

What is the expected output? What do you see instead?
The revisions section [b] seems to be missing info like weblinks, commands, files, draft comments, etc..

[b] Result from Gerrit 2.8 and master
  [..]
  "revisions": {
    "8a3d5b573ff97de2ee34373f46689182191b99c1": {
      "_number": 1,
      "fetch": {
        "anonymous http": {
          "url": "https://review.openstack.org/openstack-infra/jenkins-job-builder",
          "ref": "refs/changes/78/111478/1"
        }
      }
    }

Sep 18, 2014
#1 dborowitz@google.com
As of now this is working as intended. /changes/X/revisions/Y/review is only intended to render the old change screen's PublishCommentScreen, and is the equivalent of Get /changes/X?o=DETAILED_ACCOUNTS&o=DETAILED_LABELS.

If you want other options, use /changes/X.
Sep 18, 2014
Project Member #2 zaro0508
It doesn't seem to work as documented [1].  The documentation says the GET review command should return a ChangeInfo object which contains a RevisionInfo object and the RevisionInfo object should contain weblinks, files, actions, etc..  The 'fetch' data in the RevisionInfo object  is returned so why not the others?  Also I don't see how you can get the revision data from just using the /changes/X path?  

[1] https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info
Sep 18, 2014
#3 dborowitz@google.com
Ah. The /detail documentation is correct but the ChangeInfo documentation needs to be updated to reflect that those fields require additional options.
Sep 18, 2014
Project Member #4 zaro0508
Just a FYI.  I have already uploaded a change for this.. https://gerrit-review.googlesource.com/#/c/60194/
Sep 19, 2014
Project Member #5 David.Os...@gmail.com
(No comment was entered for this change.)
Status: Invalid
Sep 19, 2014
Project Member #6 zaro0508
I think this is a real bug, actually a documentation bug.  I have created a change to clarify the documentation.. https://gerrit-review.googlesource.com/#/c/60231

Sep 25, 2014
Project Member #7 David.Os...@gmail.com
(No comment was entered for this change.)
Status: ChangeUnderReview
Nov 15, 2014
Project Member #8 zaro0508
(No comment was entered for this change.)
Status: Submitted