Merge branch 'stable-2.6'
* stable-2.6: Fix error message when adding a reviewer that does not exist
This commit is contained in:
@@ -23,6 +23,7 @@ public class ChangeMessages extends TranslationBundle {
|
||||
}
|
||||
|
||||
public String revertChangeDefaultMessage;
|
||||
public String reviewerNotFound;
|
||||
|
||||
public String groupIsNotAllowed;
|
||||
public String groupHasTooManyMembers;
|
||||
|
@@ -129,7 +129,13 @@ public class PostReviewers implements RestModifyView<ChangeResource, Input> {
|
||||
Account.Id accountId = accounts.parse(input.reviewer).getAccountId();
|
||||
return putAccount(reviewerFactory.create(rsrc, accountId));
|
||||
} catch (UnprocessableEntityException e) {
|
||||
try {
|
||||
return putGroup(rsrc, input);
|
||||
} catch (UnprocessableEntityException e2) {
|
||||
throw new UnprocessableEntityException(MessageFormat.format(
|
||||
ChangeMessages.get().reviewerNotFound,
|
||||
input.reviewer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
# Changes to this file should also be made in
|
||||
# gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeMessages.properties
|
||||
revertChangeDefaultMessage = Revert \"{0}\"\n\nThis reverts commit {1}
|
||||
reviewerNotFound = {0} does not identify a registered user or group
|
||||
|
||||
groupIsNotAllowed = The group {0} cannot be added as reviewer.
|
||||
groupHasTooManyMembers = The group {0} has too many members to add them all as reviewers.
|
||||
|
Reference in New Issue
Block a user