diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-08 15:56:37 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-08 15:56:37 +0000 |
commit | 1579cc74c9901f496d822ca30378f2c305b6b84b (patch) | |
tree | 501e06a5ab7add500d30cdd2bab5df7f050a014a /app/controllers/projects | |
parent | 5533fd17d86e377effc8dad7ca0ac5fcb8bbebed (diff) | |
parent | 56311d2b1cca533bb97ae6a0b95987621b9ef041 (diff) | |
download | gitlab-ce-1579cc74c9901f496d822ca30378f2c305b6b84b.tar.gz |
Merge branch 'dz-bulk-edit-mr' into 'master'
Add bulk update support for merge requests list
## What does this MR do?
Adds new feature: ability to update multiple merge requests at once from index page (same like we have for issues already)
## Are there points in the code the reviewer needs to double check?
I don't think so
## Why was this MR needed?
* consistency with issues
* save user time when you want set same label/milestone to 20 merge requests
## Screenshots (if relevant)
![Screenshot_2016-09-08_11.48.49](/uploads/fe50b2472330e211eb8d6d6dafb15667/Screenshot_2016-09-08_11.48.49.png)![Screenshot_2016-09-08_11.48.46](/uploads/4833c3705120ec028f7a62a4e128998d/Screenshot_2016-09-08_11.48.46.png)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [x] ~~API support added~~
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/20087
See merge request !6226
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 72d2d361878..de02e28e384 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -20,9 +20,6 @@ class Projects::IssuesController < Projects::ApplicationController # Allow modify issue before_action :authorize_update_issue!, only: [:edit, :update] - # Allow issues bulk update - before_action :authorize_admin_issues!, only: [:bulk_update] - respond_to :html def index @@ -168,16 +165,6 @@ class Projects::IssuesController < Projects::ApplicationController end end - def bulk_update - result = Issues::BulkUpdateService.new(project, current_user, bulk_update_params).execute - - respond_to do |format| - format.json do - render json: { notice: "#{result[:count]} issues updated" } - end - end - end - protected def issue @@ -237,17 +224,4 @@ class Projects::IssuesController < Projects::ApplicationController :milestone_id, :due_date, :state_event, :task_num, :lock_version, label_ids: [] ) end - - def bulk_update_params - params.require(:update).permit( - :issues_ids, - :assignee_id, - :milestone_id, - :state_event, - :subscription_event, - label_ids: [], - add_label_ids: [], - remove_label_ids: [] - ) - end end |