3685: changenum cannot be updated via REST API as documented

Jan. 17, 2015
What version are you running?

What's the URL of the page containing the problem?

What steps will reproduce the problem?
1. Create a perforce review for a change number
2. Publish the review
3. Update the changenum via the REST API as documented here:
   curl http://reviewboard.example.com/api/review-requests/8/ -X PUT -d changenum=1234

What is the expected output? What do you see instead?
The change number is not updated as expected.

What operating system are you using? What browser?
Debian 7, Chrome 37

Please provide any additional information below.
The documentation does state that the changenum is deprecated and commit_id should be used.  The commit_id can be updated with the following command:
   curl http://reviewboard.example.com/api/review-requests/8/draft/ -X PUT -d commit_id=1234
The update succeeds, but the changenum is not updated to match, even after publishing the draft.

This wouldn't be that bad, except that the Web UI displays the changenum instead of the commit_id field.  A simpler fix might be to display commit_id instead of changenum in the UI.
#1 david
  • +EasyFix
#2 Vincent.********@gmai***** (Google Code) (Is this you? Claim this profile.)
Will give this one a shot.
#3 david
Fixed in release-2.0.x (6e485ac). Thanks!
  • +Fixed
#4 mgulick
I have verified that the fix allows me to update the changenum, but unfortunately this fix is not as useful as I hoped it would be.  Is there any way to update the changenum without calling update_from_commit_id?  This overwrites the current contents of the review request.  I really just want to update the changenum and nothing else.

I tried
  curl http://reviewboard/api/review-requests/1234/ -X PUT -d changenum=10 -d update_from_commit_id=0
but this doesn't work.

Any idea if this is possible?  Should I create a new bug/enhancement?