Fix: Also copy parentUuid in copy constructor of Comment
The copy constructor is currently only used by the code which updates a draft comment. Interestingly, nobody seemed to have noticed that this REST API actually had a bug and the parentUuid was lost when the draft comment was updated. Users of Gerrit's API didn't run into this bug as the frontend always sends all comment parameters as input to the draft update along. By the way, this issue was noticed as a side-effect of testing the implementation of another new feature (ported comments, see I4e96af5ac). Writing even seemingly trivial tests (e.g. that the parentUuid of a ported comment is kept as in the original) seemed to have paid off in this case. Change-Id: I75a65bd57fb71cb8efe9d2460bc210b557546165
This commit is contained in:
@@ -244,6 +244,7 @@ public abstract class Comment {
|
||||
c.unresolved);
|
||||
this.lineNbr = c.lineNbr;
|
||||
this.realAuthor = c.realAuthor;
|
||||
this.parentUuid = c.parentUuid;
|
||||
this.range = c.range != null ? new Range(c.range) : null;
|
||||
this.tag = c.tag;
|
||||
this.revId = c.revId;
|
||||
|
Reference in New Issue
Block a user