Bug 433003 - Wrong change id used when getting change details after a submit
Summary: Wrong change id used when getting change details after a submit
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 2.2   Edit
Hardware: PC Windows Server 2008
: P2 normal (vote)
Target Milestone: 2.4   Edit
Assignee: Steve Elsemore CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 433554 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-17 09:37 EDT by Peter Cigehn CLA
Modified: 2014-08-15 02:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Cigehn CLA 2014-04-17 09:37:03 EDT
When submitting a change using the submit button in the task editor, we had an issue where an error dialog popped up stating "Not Found". The submit as such seemed to work and the change was merged as expected, so we could not really understand what it was that was "Not Found". 

After some debugging it was discovered that the wrong change id was used when getting the change details, after the submit had been performed, causing the "Not Found" error dialog to pop up.

In the method submitRest in the class GerritClient, at the last line, there is a call to the method getChangeDetail:

	return getChangeDetail(id.get(), monitor);

The problem is that id refers to the id of the current patch set, not the id of the change itself. Comparing with other use of getChangeDetail, the id probably should be taken from the parent change instead:

	return getChangeDetail(id.getParentKey().get(), monitor);

When trying this change, the "Not Found" error dialog did not appear any longer.

I guess the reason for this bug to get unnoticed, is that most Gerrit installations have changes with ids in the same range as patch set ids, but for some reason our Gerrit server apparently lacks changes with low number ids like 1, 2 and so on.
Comment 1 Steve Elsemore CLA 2014-04-28 13:43:11 EDT
*** Bug 433554 has been marked as a duplicate of this bug. ***
Comment 2 Steve Elsemore CLA 2014-04-28 13:44:04 EDT
Patch:

https://git.eclipse.org/r/25601
Comment 3 Sam Davis CLA 2014-08-15 02:36:06 EDT
The changes have been merged.