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

Fix group boards backport related conflicts

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