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/assets/javascripts | |
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/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/issuable.js.es6 | 2 | ||||
-rw-r--r-- | app/assets/javascripts/issues-bulk-assignment.js | 4 |
3 files changed, 4 insertions, 7 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 38cdc7b9fba..179d3bc38a5 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -23,6 +23,7 @@ case 'projects:boards:show': shortcut_handler = new ShortcutsNavigation(); break; + case 'projects:merge_requests:index': case 'projects:issues:index': Issuable.init(); new IssuableBulkActions(); @@ -93,10 +94,6 @@ break; case "projects:merge_requests:conflicts": window.mcui = new MergeConflictResolver() - case 'projects:merge_requests:index': - shortcut_handler = new ShortcutsNavigation(); - Issuable.init(); - break; case 'dashboard:activity': new Activities(); break; diff --git a/app/assets/javascripts/issuable.js.es6 b/app/assets/javascripts/issuable.js.es6 index 4006ac740b2..82c14ef0157 100644 --- a/app/assets/javascripts/issuable.js.es6 +++ b/app/assets/javascripts/issuable.js.es6 @@ -77,7 +77,7 @@ }, checkChanged: function() { const $checkedIssues = $('.selected_issue:checked'); - const $updateIssuesIds = $('#update_issues_ids'); + const $updateIssuesIds = $('#update_issuable_ids'); const $issuesOtherFilters = $('.issues-other-filters'); const $issuesBulkUpdate = $('.issues_bulk_update'); diff --git a/app/assets/javascripts/issues-bulk-assignment.js b/app/assets/javascripts/issues-bulk-assignment.js index 98d3358ba92..8ca90490426 100644 --- a/app/assets/javascripts/issues-bulk-assignment.js +++ b/app/assets/javascripts/issues-bulk-assignment.js @@ -5,7 +5,7 @@ if (opts == null) { opts = {}; } - this.container = (ref = opts.container) != null ? ref : $('.content'), this.form = (ref1 = opts.form) != null ? ref1 : this.getElement('.bulk-update'), this.issues = (ref2 = opts.issues) != null ? ref2 : this.getElement('.issues-list .issue'); + this.container = (ref = opts.container) != null ? ref : $('.content'), this.form = (ref1 = opts.form) != null ? ref1 : this.getElement('.bulk-update'), this.issues = (ref2 = opts.issues) != null ? ref2 : this.getElement('.issuable-list > li'); this.form.data('bulkActions', this); this.willUpdateLabels = false; this.bindEvents(); @@ -106,7 +106,7 @@ state_event: this.form.find('input[name="update[state_event]"]').val(), assignee_id: this.form.find('input[name="update[assignee_id]"]').val(), milestone_id: this.form.find('input[name="update[milestone_id]"]').val(), - issues_ids: this.form.find('input[name="update[issues_ids]"]').val(), + issuable_ids: this.form.find('input[name="update[issuable_ids]"]').val(), subscription_event: this.form.find('input[name="update[subscription_event]"]').val(), add_label_ids: [], remove_label_ids: [] |