Merge "Do not set 'mergeable' field in ChangeInfo for merged changes"

This commit is contained in:
Edwin Kempin
2013-02-27 12:54:51 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -750,7 +750,6 @@ describes the submitted/merged change.
"created": "2013-02-01 09:59:32.126000000",
"updated": "2013-02-21 11:16:36.775000000",
"reviewed": true,
"mergeable": true,
"_sortkey": "0023412400000f7d",
"_number": 3965,
"owner": {
@@ -1407,7 +1406,9 @@ updated.
Whether the calling user has starred this change.
|`reviewed` |not set if `false`|
Whether the change was reviewed by the calling user.
|`mergeable` ||Whether the change is mergeable.
|`mergeable` |optional|
Whether the change is mergeable. +
Not set for merged changed.
|`_sortkey` ||The sortkey of the change.
|`_number` ||The legacy numeric ID of the change.
|`owner` ||

View File

@@ -236,7 +236,7 @@ public class ChangeJson {
out.branch = in.getDest().getShortName();
out.topic = in.getTopic();
out.changeId = in.getKey().get();
out.mergeable = in.isMergeable();
out.mergeable = in.getStatus() != Change.Status.MERGED ? in.isMergeable() : null;
out.subject = in.getSubject();
out.status = in.getStatus();
out.owner = accountLoader.get(in.getOwner());