Commit 48c34172 authored by Valery Sizov's avatar Valery Sizov

[Approvers Group] Fixes afteer review

parent 7b702c68
...@@ -6,9 +6,9 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -6,9 +6,9 @@ Please view this file on the master branch, on stable branches it's out of date.
- Fix validations related to mirroring settings form. !773 - Fix validations related to mirroring settings form. !773
- Fix Git access panel for Wikis when Kerberos authentication is enabled (Borja Aparicio) - Fix Git access panel for Wikis when Kerberos authentication is enabled (Borja Aparicio)
- Decrease maximum time that GitLab waits for a mirror to finish !791 (Borja Aparicio) - Decrease maximum time that GitLab waits for a mirror to finish !791 (Borja Aparicio)
- User groups (that can be assigned as approvers)
## 8.12.5 ## 8.12.5
- User groups (that can be assigned as approvers)
- No EE-specific changes - No EE-specific changes
......
(function() { (function() {
$(function() { $(function() {
$(".approver-list").on("click", ".unsaved-approvers.approver .btn-remove", function() { $(".approver-list").on("click", ".unsaved-approvers.approver .btn-remove", function(ev) {
var removeElement = $(this).closest("li"); var removeElement = $(this).closest("li");
var approverId = parseInt(removeElement.attr("id").replace("user_","")); var approverId = parseInt(removeElement.attr("id").replace("user_",""), 10);
var approverIds = $("input#merge_request_approver_ids"); var approverIds = $("input#merge_request_approver_ids");
var skipUsers = approverIds.data("skip-users") || []; var skipUsers = approverIds.data("skip-users") || [];
var approverIndex = skipUsers.indexOf(approverId); var approverIndex = skipUsers.indexOf(approverId);
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
approverIds.data("skip-users", skipUsers.splice(approverIndex, 1)); approverIds.data("skip-users", skipUsers.splice(approverIndex, 1));
} }
return false; ev.preventDefault();
}); });
$(".approver-list").on("click", ".unsaved-approvers.approver-group .btn-remove", function() { $(".approver-list").on("click", ".unsaved-approvers.approver-group .btn-remove", function(ev) {
var removeElement = $(this).closest("li"); var removeElement = $(this).closest("li");
var approverGroupId = parseInt(removeElement.attr("id").replace("group_","")); var approverGroupId = parseInt(removeElement.attr("id").replace("group_",""), 10);
var approverGroupIds = $("input#merge_request_approver_group_ids"); var approverGroupIds = $("input#merge_request_approver_group_ids");
var skipGroups = approverGroupIds.data("skip-groups") || []; var skipGroups = approverGroupIds.data("skip-groups") || [];
var approverGroupIndex = skipGroups.indexOf(approverGroupId); var approverGroupIndex = skipGroups.indexOf(approverGroupId);
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
approverGroupIds.data("skip-groups", skipGroups.splice(approverGroupIndex, 1)); approverGroupIds.data("skip-groups", skipGroups.splice(approverGroupIndex, 1));
} }
return false; ev.preventDefault();
}); });
$("form.merge-request-form").submit(function() { $("form.merge-request-form").submit(function() {
......
...@@ -7,7 +7,7 @@ Get a list of groups. (As user: my groups or all available, as admin: all groups ...@@ -7,7 +7,7 @@ Get a list of groups. (As user: my groups or all available, as admin: all groups
Parameters: Parameters:
- `all_available` (optional) - if passed, show all groups you have access to - `all_available` (optional) - if passed, show all groups you have access to
- `skip_groups` (optional)(array of group paths) - if passed, skip groups - `skip_groups` (optional)(array of group IDs) - if passed, skip groups
``` ```
GET /groups GET /groups
......
...@@ -62,7 +62,7 @@ sent to them and a todo is added to their list of todos. ...@@ -62,7 +62,7 @@ sent to them and a todo is added to their list of todos.
> [Introduced][ee-743] in GitLab Enterprise Edition 8.13. > [Introduced][ee-743] in GitLab Enterprise Edition 8.13.
You can also assign one or more groups that can be assigned as approvers. It You can also define one or more groups that can be assigned as approvers. It
works the same way like regular approvers do, the only difference is that you works the same way like regular approvers do, the only difference is that you
assign several users with one action. One possible scenario would be to to assign assign several users with one action. One possible scenario would be to to assign
a group of approvers at the project level and change them later when creating a group of approvers at the project level and change them later when creating
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment