Commit 7f90f19d authored by Felipe Artur's avatar Felipe Artur

Fix group boards backport related conflicts

parent cd447268
<script> <script>
import eventHub from '../eventhub'; import eventHub from '../eventhub';
<<<<<<< HEAD
import ProjectSelect from 'ee/boards/components/project_select.vue'; // eslint-disable-line import/first import ProjectSelect from 'ee/boards/components/project_select.vue'; // eslint-disable-line import/first
=======
import ProjectSelect from './project_select.vue';
>>>>>>> upstream/master
import ListIssue from '../models/issue'; import ListIssue from '../models/issue';
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
......
...@@ -43,7 +43,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({ ...@@ -43,7 +43,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
labelIds = ['']; labelIds = [''];
} }
<<<<<<< HEAD
let assigneeIds = issue.assignees let assigneeIds = issue.assignees
.map(assignee => assignee.id) .map(assignee => assignee.id)
.filter(id => id !== board.assignee.id); .filter(id => id !== board.assignee.id);
...@@ -52,8 +51,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({ ...@@ -52,8 +51,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
assigneeIds = ['0']; assigneeIds = ['0'];
} }
=======
>>>>>>> upstream/master
const data = { const data = {
issue: { issue: {
label_ids: labelIds, label_ids: labelIds,
...@@ -61,7 +58,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({ ...@@ -61,7 +58,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
}, },
}; };
<<<<<<< HEAD
if (board.milestone_id) { if (board.milestone_id) {
data.issue.milestone_id = -1; data.issue.milestone_id = -1;
} }
...@@ -70,8 +66,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({ ...@@ -70,8 +66,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
data.issue.weight = null; data.issue.weight = null;
} }
=======
>>>>>>> upstream/master
// Post the remove data // Post the remove data
Vue.http.patch(this.updateUrl, data).catch(() => { Vue.http.patch(this.updateUrl, data).catch(() => {
Flash(__('Failed to remove issue from board, please try again.')); Flash(__('Failed to remove issue from board, please try again.'));
......
...@@ -7,11 +7,8 @@ export default class FilteredSearchBoards extends FilteredSearchManager { ...@@ -7,11 +7,8 @@ export default class FilteredSearchBoards extends FilteredSearchManager {
constructor(store, updateUrl = false, cantEdit = []) { constructor(store, updateUrl = false, cantEdit = []) {
super({ super({
page: 'boards', page: 'boards',
<<<<<<< HEAD
isGroup: true, isGroup: true,
filteredSearchTokenKeys: FilteredSearchTokenKeysIssues, filteredSearchTokenKeys: FilteredSearchTokenKeysIssues,
=======
>>>>>>> upstream/master
stateFiltersSelector: '.issues-state-filters', stateFiltersSelector: '.issues-state-filters',
}); });
......
...@@ -259,11 +259,8 @@ export default () => { ...@@ -259,11 +259,8 @@ export default () => {
return { return {
modal: ModalStore.store, modal: ModalStore.store,
store: Store.state, store: Store.state,
<<<<<<< HEAD
isFullscreen: false, isFullscreen: false,
focusModeAvailable: $boardApp.hasAttribute('data-focus-mode-available'), focusModeAvailable: $boardApp.hasAttribute('data-focus-mode-available'),
=======
>>>>>>> upstream/master
canAdminList: this.$options.el.hasAttribute('data-can-admin-list'), canAdminList: this.$options.el.hasAttribute('data-can-admin-list'),
}; };
}, },
......
/* eslint-disable no-unused-vars, no-mixed-operators, comma-dangle */ /* eslint-disable no-unused-vars, no-mixed-operators, comma-dangle */
/* global DocumentTouch */ /* global DocumentTouch */
<<<<<<< HEAD
import sortableConfig from 'ee/sortable/sortable_config'; import sortableConfig from 'ee/sortable/sortable_config';
=======
import sortableConfig from '../../sortable/sortable_config';
>>>>>>> upstream/master
window.gl = window.gl || {}; window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {}; window.gl.issueBoards = window.gl.issueBoards || {};
......
...@@ -4,11 +4,7 @@ ...@@ -4,11 +4,7 @@
/* global ListAssignee */ /* global ListAssignee */
import Vue from 'vue'; import Vue from 'vue';
<<<<<<< HEAD
import IssueProject from 'ee/boards/models/project'; import IssueProject from 'ee/boards/models/project';
=======
import IssueProject from './project';
>>>>>>> upstream/master
class ListIssue { class ListIssue {
constructor (obj, defaultAvatar) { constructor (obj, defaultAvatar) {
...@@ -33,10 +29,7 @@ class ListIssue { ...@@ -33,10 +29,7 @@ class ListIssue {
this.toggleSubscriptionEndpoint = obj.toggle_subscription_endpoint; this.toggleSubscriptionEndpoint = obj.toggle_subscription_endpoint;
this.milestone_id = obj.milestone_id; this.milestone_id = obj.milestone_id;
this.project_id = obj.project_id; this.project_id = obj.project_id;
<<<<<<< HEAD
this.weight = obj.weight; this.weight = obj.weight;
=======
>>>>>>> upstream/master
if (obj.project) { if (obj.project) {
this.project = new IssueProject(obj.project); this.project = new IssueProject(obj.project);
......
class Groups::BoardsController < Groups::ApplicationController class Groups::BoardsController < Groups::ApplicationController
<<<<<<< HEAD
prepend EE::Boards::BoardsController prepend EE::Boards::BoardsController
=======
>>>>>>> upstream/master
include BoardsResponses include BoardsResponses
before_action :assign_endpoint_vars before_action :assign_endpoint_vars
......
class Board < ActiveRecord::Base class Board < ActiveRecord::Base
<<<<<<< HEAD
prepend EE::Board prepend EE::Board
=======
>>>>>>> upstream/master
belongs_to :group belongs_to :group
belongs_to :project belongs_to :project
......
...@@ -1697,13 +1697,6 @@ class Project < ActiveRecord::Base ...@@ -1697,13 +1697,6 @@ class Project < ActiveRecord::Base
# Overridden on EE module # Overridden on EE module
def multiple_issue_boards_available? def multiple_issue_boards_available?
false false
<<<<<<< HEAD
=======
end
def issue_board_milestone_available?(user = nil)
feature_available?(:issue_board_milestone, user)
>>>>>>> upstream/master
end end
def full_path_was def full_path_was
......
...@@ -137,9 +137,6 @@ ...@@ -137,9 +137,6 @@
= dropdown_loading = dropdown_loading
- if @project - if @project
#js-add-issues-btn.prepend-left-10{ data: { can_admin_list: can?(current_user, :admin_list, @project) } } #js-add-issues-btn.prepend-left-10{ data: { can_admin_list: can?(current_user, :admin_list, @project) } }
<<<<<<< HEAD
#js-toggle-focus-btn.prepend-left-10 #js-toggle-focus-btn.prepend-left-10
=======
>>>>>>> upstream/master
- elsif type != :boards_modal - elsif type != :boards_modal
= render 'shared/sort_dropdown' = render 'shared/sort_dropdown'
...@@ -59,7 +59,6 @@ constraints(GroupUrlConstrainer.new) do ...@@ -59,7 +59,6 @@ constraints(GroupUrlConstrainer.new) do
end end
end end
<<<<<<< HEAD
## EE-specific ## EE-specific
resource :analytics, only: [:show] resource :analytics, only: [:show]
resource :ldap, only: [] do resource :ldap, only: [] do
...@@ -102,10 +101,6 @@ constraints(GroupUrlConstrainer.new) do ...@@ -102,10 +101,6 @@ constraints(GroupUrlConstrainer.new) do
## EE-specific ## EE-specific
resource :roadmap, only: [:show], controller: 'roadmap' resource :roadmap, only: [:show], controller: 'roadmap'
=======
# On CE only index and show actions are needed
resources :boards, only: [:index, :show]
>>>>>>> upstream/master
end end
scope(path: '*id', scope(path: '*id',
......
...@@ -423,11 +423,7 @@ constraints(ProjectUrlConstrainer.new) do ...@@ -423,11 +423,7 @@ constraints(ProjectUrlConstrainer.new) do
get 'noteable/:target_type/:target_id/notes' => 'notes#index', as: 'noteable_notes' get 'noteable/:target_type/:target_id/notes' => 'notes#index', as: 'noteable_notes'
# On CE only index and show are needed # On CE only index and show are needed
<<<<<<< HEAD
resources :boards, only: [:index, :show, :create, :update, :destroy] resources :boards, only: [:index, :show, :create, :update, :destroy]
=======
resources :boards, only: [:index, :show]
>>>>>>> upstream/master
resources :todos, only: [:create] resources :todos, only: [:create]
......
...@@ -276,7 +276,6 @@ ActiveRecord::Schema.define(version: 20180307012445) do ...@@ -276,7 +276,6 @@ ActiveRecord::Schema.define(version: 20180307012445) do
t.integer "project_id" t.integer "project_id"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
<<<<<<< HEAD
t.string "name", default: "Development", null: false t.string "name", default: "Development", null: false
t.integer "milestone_id" t.integer "milestone_id"
t.integer "group_id" t.integer "group_id"
...@@ -285,12 +284,6 @@ ActiveRecord::Schema.define(version: 20180307012445) do ...@@ -285,12 +284,6 @@ ActiveRecord::Schema.define(version: 20180307012445) do
add_index "boards", ["group_id"], name: "index_boards_on_group_id", using: :btree add_index "boards", ["group_id"], name: "index_boards_on_group_id", using: :btree
add_index "boards", ["milestone_id"], name: "index_boards_on_milestone_id", using: :btree add_index "boards", ["milestone_id"], name: "index_boards_on_milestone_id", using: :btree
=======
t.integer "group_id"
end
add_index "boards", ["group_id"], name: "index_boards_on_group_id", using: :btree
>>>>>>> upstream/master
add_index "boards", ["project_id"], name: "index_boards_on_project_id", using: :btree add_index "boards", ["project_id"], name: "index_boards_on_project_id", using: :btree
create_table "broadcast_messages", force: :cascade do |t| create_table "broadcast_messages", force: :cascade do |t|
...@@ -2529,15 +2522,11 @@ ActiveRecord::Schema.define(version: 20180307012445) do ...@@ -2529,15 +2522,11 @@ ActiveRecord::Schema.define(version: 20180307012445) do
add_foreign_key "approver_groups", "namespaces", column: "group_id", on_delete: :cascade add_foreign_key "approver_groups", "namespaces", column: "group_id", on_delete: :cascade
add_foreign_key "badges", "namespaces", column: "group_id", on_delete: :cascade add_foreign_key "badges", "namespaces", column: "group_id", on_delete: :cascade
add_foreign_key "badges", "projects", on_delete: :cascade add_foreign_key "badges", "projects", on_delete: :cascade
<<<<<<< HEAD
add_foreign_key "board_assignees", "boards", on_delete: :cascade add_foreign_key "board_assignees", "boards", on_delete: :cascade
add_foreign_key "board_assignees", "users", column: "assignee_id", on_delete: :cascade add_foreign_key "board_assignees", "users", column: "assignee_id", on_delete: :cascade
add_foreign_key "board_labels", "boards", on_delete: :cascade add_foreign_key "board_labels", "boards", on_delete: :cascade
add_foreign_key "board_labels", "labels", on_delete: :cascade add_foreign_key "board_labels", "labels", on_delete: :cascade
add_foreign_key "boards", "namespaces", column: "group_id", name: "fk_1e9a074a35", on_delete: :cascade add_foreign_key "boards", "namespaces", column: "group_id", name: "fk_1e9a074a35", on_delete: :cascade
=======
add_foreign_key "boards", "namespaces", column: "group_id", on_delete: :cascade
>>>>>>> upstream/master
add_foreign_key "boards", "projects", name: "fk_f15266b5f9", on_delete: :cascade add_foreign_key "boards", "projects", name: "fk_f15266b5f9", on_delete: :cascade
add_foreign_key "chat_teams", "namespaces", on_delete: :cascade add_foreign_key "chat_teams", "namespaces", on_delete: :cascade
add_foreign_key "ci_build_trace_section_names", "projects", on_delete: :cascade add_foreign_key "ci_build_trace_section_names", "projects", on_delete: :cascade
......
...@@ -88,12 +88,8 @@ Manage your [repositories](user/project/repository/index.md) from the UI (user i ...@@ -88,12 +88,8 @@ Manage your [repositories](user/project/repository/index.md) from the UI (user i
- [Discussions](user/discussions/index.md): Threads, comments, and resolvable discussions in issues, commits, and merge requests. - [Discussions](user/discussions/index.md): Threads, comments, and resolvable discussions in issues, commits, and merge requests.
- [Issues](user/project/issues/index.md) - [Issues](user/project/issues/index.md)
- [Project issue Board](user/project/issue_board.md) - [Project issue Board](user/project/issue_board.md)
<<<<<<< HEAD
- [Group Issue Boards](user/project/issue_board.md#group-issue-boards) - [Group Issue Boards](user/project/issue_board.md#group-issue-boards)
- **(Starter/Premium)** [Related Issues](user/project/issues/related_issues.md): create a relationship between issues - **(Starter/Premium)** [Related Issues](user/project/issues/related_issues.md): create a relationship between issues
=======
- [Group Issue Board](user/project/issue_board.md#group-issue-board)
>>>>>>> upstream/master
- [Issues and merge requests templates](user/project/description_templates.md): Create templates for submitting new issues and merge requests. - [Issues and merge requests templates](user/project/description_templates.md): Create templates for submitting new issues and merge requests.
- [Labels](user/project/labels.md): Categorize your issues or merge requests based on descriptive titles. - [Labels](user/project/labels.md): Categorize your issues or merge requests based on descriptive titles.
- [Merge Requests](user/project/merge_requests/index.md) - [Merge Requests](user/project/merge_requests/index.md)
......
...@@ -27,16 +27,12 @@ Example response: ...@@ -27,16 +27,12 @@ Example response:
[ [
{ {
"id": 1, "id": 1,
<<<<<<< HEAD
"name:": "group issue board", "name:": "group issue board",
"group_id": 5, "group_id": 5,
"milestone": { "milestone": {
"id": 12 "id": 12
"title": "10.0" "title": "10.0"
}, },
=======
"group_id": 5,
>>>>>>> upstream/master
"lists" : [ "lists" : [
{ {
"id" : 1, "id" : 1,
...@@ -92,7 +88,6 @@ Example response: ...@@ -92,7 +88,6 @@ Example response:
```json ```json
{ {
"id": 1, "id": 1,
<<<<<<< HEAD
"name:": "group issue board", "name:": "group issue board",
"group_id": 5, "group_id": 5,
"milestone": { "milestone": {
...@@ -159,9 +154,6 @@ Example response: ...@@ -159,9 +154,6 @@ Example response:
"id": 12 "id": 12
"title": "10.0" "title": "10.0"
}, },
=======
"group_id": 5,
>>>>>>> upstream/master
"lists" : [ "lists" : [
{ {
"id" : 1, "id" : 1,
...@@ -194,7 +186,6 @@ Example response: ...@@ -194,7 +186,6 @@ Example response:
} }
``` ```
<<<<<<< HEAD
## Delete a board ## Delete a board
Deletes a board. Deletes a board.
...@@ -212,8 +203,6 @@ DELETE /groups/:id/boards/:board_id ...@@ -212,8 +203,6 @@ DELETE /groups/:id/boards/:board_id
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards/1 curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/5/boards/1
``` ```
=======
>>>>>>> upstream/master
## List board lists ## List board lists
Get a list of the board's lists. Get a list of the board's lists.
......
module API module API
class GroupBoards < Grape::API class GroupBoards < Grape::API
include BoardsResponses include BoardsResponses
<<<<<<< HEAD
include EE::API::BoardsResponses include EE::API::BoardsResponses
=======
>>>>>>> upstream/master
include PaginationParams include PaginationParams
before do before do
...@@ -24,11 +21,7 @@ module API ...@@ -24,11 +21,7 @@ module API
resource :groups, requirements: API::PROJECT_ENDPOINT_REQUIREMENTS do resource :groups, requirements: API::PROJECT_ENDPOINT_REQUIREMENTS do
segment ':id/boards' do segment ':id/boards' do
desc 'Find a group board' do desc 'Find a group board' do
<<<<<<< HEAD
detail 'This feature was introduced in 10.4' detail 'This feature was introduced in 10.4'
=======
detail 'This feature was introduced in 10.6'
>>>>>>> upstream/master
success ::API::Entities::Board success ::API::Entities::Board
end end
get '/:board_id' do get '/:board_id' do
...@@ -36,11 +29,7 @@ module API ...@@ -36,11 +29,7 @@ module API
end end
desc 'Get all group boards' do desc 'Get all group boards' do
<<<<<<< HEAD
detail 'This feature was introduced in 10.4' detail 'This feature was introduced in 10.4'
=======
detail 'This feature was introduced in 10.6'
>>>>>>> upstream/master
success Entities::Board success Entities::Board
end end
params do params do
...@@ -56,11 +45,7 @@ module API ...@@ -56,11 +45,7 @@ module API
end end
segment ':id/boards/:board_id' do segment ':id/boards/:board_id' do
desc 'Get the lists of a group board' do desc 'Get the lists of a group board' do
<<<<<<< HEAD
detail 'Does not include backlog and closed lists. This feature was introduced in 10.4' detail 'Does not include backlog and closed lists. This feature was introduced in 10.4'
=======
detail 'Does not include backlog and closed lists. This feature was introduced in 10.6'
>>>>>>> upstream/master
success Entities::List success Entities::List
end end
params do params do
...@@ -71,11 +56,7 @@ module API ...@@ -71,11 +56,7 @@ module API
end end
desc 'Get a list of a group board' do desc 'Get a list of a group board' do
<<<<<<< HEAD
detail 'This feature was introduced in 10.4' detail 'This feature was introduced in 10.4'
=======
detail 'This feature was introduced in 10.6'
>>>>>>> upstream/master
success Entities::List success Entities::List
end end
params do params do
...@@ -86,11 +67,7 @@ module API ...@@ -86,11 +67,7 @@ module API
end end
desc 'Create a new board list' do desc 'Create a new board list' do
<<<<<<< HEAD
detail 'This feature was introduced in 10.4' detail 'This feature was introduced in 10.4'
=======
detail 'This feature was introduced in 10.6'
>>>>>>> upstream/master
success Entities::List success Entities::List
end end
params do params do
...@@ -107,11 +84,7 @@ module API ...@@ -107,11 +84,7 @@ module API
end end
desc 'Moves a board list to a new position' do desc 'Moves a board list to a new position' do
<<<<<<< HEAD
detail 'This feature was introduced in 10.4' detail 'This feature was introduced in 10.4'
=======
detail 'This feature was introduced in 10.6'
>>>>>>> upstream/master
success Entities::List success Entities::List
end end
params do params do
...@@ -127,11 +100,7 @@ module API ...@@ -127,11 +100,7 @@ module API
end end
desc 'Delete a board list' do desc 'Delete a board list' do
<<<<<<< HEAD
detail 'This feature was introduced in 10.4' detail 'This feature was introduced in 10.4'
=======
detail 'This feature was introduced in 10.6'
>>>>>>> upstream/master
success Entities::List success Entities::List
end end
params do params do
......
...@@ -39,11 +39,7 @@ describe Groups::BoardsController do ...@@ -39,11 +39,7 @@ describe Groups::BoardsController do
context 'when format is JSON' do context 'when format is JSON' do
it 'return an array with one group board' do it 'return an array with one group board' do
<<<<<<< HEAD
create(:board, group: group, milestone: create(:milestone, group: group)) create(:board, group: group, milestone: create(:milestone, group: group))
=======
create(:board, group: group)
>>>>>>> upstream/master
list_boards format: :json list_boards format: :json
......
FactoryBot.define do FactoryBot.define do
factory :board do factory :board do
<<<<<<< HEAD
sequence(:name) { |n| "board#{n}" } sequence(:name) { |n| "board#{n}" }
=======
>>>>>>> upstream/master
transient do transient do
project nil project nil
group nil group nil
......
...@@ -138,17 +138,10 @@ describe('Api', () => { ...@@ -138,17 +138,10 @@ describe('Api', () => {
}); });
}); });
<<<<<<< HEAD
it('creates a new group label', (done) => { it('creates a new group label', (done) => {
const namespace = 'some namespace'; const namespace = 'some namespace';
const labelData = { some: 'data' }; const labelData = { some: 'data' };
const expectedUrl = Api.buildUrl(Api.groupLabelsPath).replace(':namespace_path', namespace); const expectedUrl = Api.buildUrl(Api.groupLabelsPath).replace(':namespace_path', namespace);
=======
it('creates a group label', (done) => {
const namespace = 'group/subgroup';
const labelData = { some: 'data' };
const expectedUrl = `${dummyUrlRoot}/groups/${namespace}/-/labels`;
>>>>>>> upstream/master
const expectedData = { const expectedData = {
label: labelData, label: labelData,
}; };
...@@ -160,11 +153,7 @@ describe('Api', () => { ...@@ -160,11 +153,7 @@ describe('Api', () => {
}]; }];
}); });
<<<<<<< HEAD
Api.newLabel(namespace, null, labelData, (response) => { Api.newLabel(namespace, null, labelData, (response) => {
=======
Api.newLabel(namespace, undefined, labelData, (response) => {
>>>>>>> upstream/master
expect(response.name).toBe('test'); expect(response.name).toBe('test');
done(); done();
}); });
......
...@@ -13,7 +13,6 @@ describe 'layouts/nav/sidebar/_project' do ...@@ -13,7 +13,6 @@ describe 'layouts/nav/sidebar/_project' do
describe 'issue boards' do describe 'issue boards' do
it 'has board tab' do it 'has board tab' do
<<<<<<< HEAD
render render
expect(rendered).to have_css('a[title="Boards"]') expect(rendered).to have_css('a[title="Boards"]')
...@@ -23,8 +22,6 @@ describe 'layouts/nav/sidebar/_project' do ...@@ -23,8 +22,6 @@ describe 'layouts/nav/sidebar/_project' do
allow(License).to receive(:feature_available?).and_call_original allow(License).to receive(:feature_available?).and_call_original
allow(License).to receive(:feature_available?).with(:multiple_project_issue_boards) { false } allow(License).to receive(:feature_available?).with(:multiple_project_issue_boards) { false }
=======
>>>>>>> upstream/master
render render
expect(rendered).to have_css('a[title="Board"]') expect(rendered).to have_css('a[title="Board"]')
......
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