summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-06-30 14:17:42 +0200
committerPatrick Derichs <pderichs@gitlab.com>2019-09-02 12:53:47 +0200
commit73a2314d470c4a5597e53a501ef9a94923ded86b (patch)
tree6a7a997963079638bccb7d54ac3aeb5973281cbb
parent28fb2651c551b3b9070b5e3ea7b83a080d714fa5 (diff)
downloadgitlab-ce-test-move-issues-pderichs.tar.gz
Moving multiple issues (test ui)test-move-issues-pderichs
-rw-r--r--app/assets/javascripts/pages/projects/boards/index.js31
-rw-r--r--app/views/shared/boards/_show.html.haml8
-rw-r--r--changelogs/unreleased/35757-move-issues-in-boards-pderichs.yml5
-rw-r--r--config/routes.rb2
4 files changed, 38 insertions, 8 deletions
diff --git a/app/assets/javascripts/pages/projects/boards/index.js b/app/assets/javascripts/pages/projects/boards/index.js
index 79c3be771d0..d8525daabad 100644
--- a/app/assets/javascripts/pages/projects/boards/index.js
+++ b/app/assets/javascripts/pages/projects/boards/index.js
@@ -1,9 +1,40 @@
import UsersSelect from '~/users_select';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import initBoards from '~/boards';
+import $ from 'jquery';
+import axios from '~/lib/utils/axios_utils';
document.addEventListener('DOMContentLoaded', () => {
new UsersSelect(); // eslint-disable-line no-new
new ShortcutsNavigation(); // eslint-disable-line no-new
initBoards();
+
+ // TODO: Just for testing - remove this. (pd)
+ $('.btn-patricks-test-367346').click(function() {
+ var response;
+ var data = {
+ ids: [183, 184, 185],
+ from_list_id: 5,
+ to_list_id: 7,
+ move_before_id: 186,
+ move_after_id: null
+ };
+ axios.put("/-/boards/2/issues/move_multiple", data).then(({ response }) => {
+
+ });
+ });
+
+ $('.btn-patricks-test-367347').click(function() {
+ var response;
+ var data = {
+ id: 183,
+ from_list_id: 5,
+ to_list_id: 7,
+ move_before_id: 186
+ };
+ axios.put("/-/boards/2/issues/183", data).then(({ response }) => {
+
+ });
+ });
+
});
diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml
index 93fc839a371..ec6806e55c0 100644
--- a/app/views/shared/boards/_show.html.haml
+++ b/app/views/shared/boards/_show.html.haml
@@ -6,8 +6,14 @@
- breadcrumb_title _("Issue Boards")
- page_title("#{board.name}", _("Boards"))
-- content_for :page_specific_javascripts do
+%button{ type: 'button',
+ class: "btn btn-success btn-patricks-test-367346" }
+ = "Move multiple Test"
+%button{ type: 'button',
+ class: "btn btn-success btn-patricks-test-367347" }
+ = "Move one issue"
+- content_for :page_specific_javascripts do
-# haml-lint:disable InlineJavaScript
%script#js-board-template{ type: "text/x-template" }= render "shared/boards/components/board"
%script#js-board-modal-filter{ type: "text/x-template" }= render "shared/issuable/search_bar", type: :boards_modal, show_sorting_dropdown: false
diff --git a/changelogs/unreleased/35757-move-issues-in-boards-pderichs.yml b/changelogs/unreleased/35757-move-issues-in-boards-pderichs.yml
deleted file mode 100644
index ae50350f70d..00000000000
--- a/changelogs/unreleased/35757-move-issues-in-boards-pderichs.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Add endpoint to move multiple issues in boards
-merge_request: 30216
-author:
-type: added
diff --git a/config/routes.rb b/config/routes.rb
index eb98c5faea9..c333550f758 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -73,8 +73,6 @@ Rails.application.routes.draw do
resources :metrics, only: [:index]
mount Peek::Railtie => '/peek', as: 'peek_routes'
- put 'boards/:board_id/issues/move_multiple' => 'boards/issues#move_multiple_issues', format: :json
-
# Boards resources shared between group and projects
resources :boards, only: [] do
resources :lists, module: :boards, only: [:index, :create, :update, :destroy] do