New issue
Advanced search Search tips

Issue 9245 link

Starred by 1 user

Issue metadata

Status: Submitted
Owner: ----
Closed: Jun 12



Sign in to add a comment

Change REST API /move response incorrectly includes old branch name

Project Member Reported by david.pu...@gmail.com, Jun 12

Issue description

*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version: 2.14.6

What steps will reproduce the problem?
1. Upload a change to master
2. Use the REST API to move the change to stable-5.0
3.

What is the expected output?

Change is moved to stable-5.0 and the REST response includes the branch with value stable-5.0 as described in the documentation [1].

What do you see instead?

The change was moved, but the REST response shows the old branch name.

Please provide any additional information below.

[1] http://gerrit-documentation.storage.googleapis.com/Documentation/2.14/rest-api-changes.html#move-change

jgit $ cat data.txt
{
    "destination_branch" : "stable-5.0"
}

jgit $ curl -n -XPOST --header "Content-Type: application/json" -d@data.txt https://git.eclipse.org/r/a/changes/I157e62a0e1479d4bc95ef867e616ca8a30041759/move
)]}'
{
  "id": "jgit%2Fjgit~master~I157e62a0e1479d4bc95ef867e616ca8a30041759",
  "project": "jgit/jgit",
  "branch": "master",
  "hashtags": [],
  "change_id": "I157e62a0e1479d4bc95ef867e616ca8a30041759",
  "subject": "RefUpdateTest: Refactor to not use deprecated Repository#getAllRefs",
  "status": "NEW",
  "created": "2018-05-23 04:56:15.000000000",
  "updated": "2018-05-29 00:52:34.000000000",
  "submit_type": "MERGE_IF_NECESSARY",
  "mergeable": false,
  "insertions": 27,
  "deletions": 17,
  "unresolved_comment_count": 2,
  "_number": 123126,
  "owner": {
    "_account_id": 925
  }
}

jgit $ curl -n https://git.eclipse.org/r/a/changes/I157e62a0e1479d4bc95ef867e616ca8a30041759
)]}'
{
  "id": "jgit%2Fjgit~stable-5.0~I157e62a0e1479d4bc95ef867e616ca8a30041759",
  "project": "jgit/jgit",
  "branch": "stable-5.0",
  "hashtags": [],
  "change_id": "I157e62a0e1479d4bc95ef867e616ca8a30041759",
  "subject": "RefUpdateTest: Refactor to not use deprecated Repository#getAllRefs",
  "status": "NEW",
  "created": "2018-05-23 04:56:15.000000000",
  "updated": "2018-06-12 05:16:20.000000000",
  "submit_type": "MERGE_IF_NECESSARY",
  "mergeable": true,
  "insertions": 27,
  "deletions": 17,
  "unresolved_comment_count": 2,
  "_number": 123126,
  "owner": {
    "_account_id": 925
  }
}

 
Status: ChangeUnderReview (was: New)
https://gerrit-review.googlesource.com/#/c/gerrit/+/184433
Labels: FixedIn-2.14.9
Status: Submitted (was: ChangeUnderReview)

Sign in to add a comment