Copy labels dynamically in ApprovalsUtil.byPatchSet
The intent is to use this method from ChangeJson to dynamically copy labels every time the change detail is loaded, thus not relying on one-time copying of labels in the notedb read path. To do so requires a bit of refactoring, since the ChangeControl now needs to be passed into this method. Change-Id: I8bc25d32a91218e074517dcacf4bf3a77d4ae957
This commit is contained in:
@@ -239,6 +239,7 @@ public class PostReviewers implements RestModifyView<ChangeResource, AddReviewer
|
||||
indexer.indexAsync(rsrc.getChange().getId());
|
||||
result.reviewers = Lists.newArrayListWithCapacity(added.size());
|
||||
for (PatchSetApproval psa : added) {
|
||||
// New reviewers have value 0, don't bother normalizing.
|
||||
result.reviewers.add(json.format(
|
||||
new ReviewerInfo(psa.getAccountId()),
|
||||
reviewers.get(psa.getAccountId()),
|
||||
|
Reference in New Issue
Block a user