Commit 88b71f0f authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'ce-to-ee-2018-11-02' into 'master'

CE upstream - 2018-11-02 14:21 UTC

See merge request gitlab-org/gitlab-ee!8199
parents d57b6519 aa5de92d
......@@ -2,6 +2,7 @@
module ProjectUnauthorized
prepend EE::ProjectUnauthorized
extend ActiveSupport::Concern
# EE would override this
......
title: Make Issue Board sidebar show project-specific labels based on selected Issue
merge_request: 22475
author:
type: fixed
......@@ -45,7 +45,7 @@ class CreateMissingNamespaceForInternalUsers < ActiveRecord::Migration
connection.exec_query(query).present?
end
insert_query = "INSERT INTO namespaces(owner_id, path, name) VALUES(#{user_id}, '#{path}', '#{path}')"
insert_query = "INSERT INTO namespaces(owner_id, path, name, created_at, updated_at) VALUES(#{user_id}, '#{path}', '#{path}', NOW(), NOW())"
namespace_id = connection.insert_sql(insert_query)
create_route(namespace_id)
......@@ -57,7 +57,7 @@ class CreateMissingNamespaceForInternalUsers < ActiveRecord::Migration
row = connection.exec_query("SELECT id, path FROM namespaces WHERE id=#{namespace_id}").first
id, path = row.values_at('id', 'path')
execute("INSERT INTO routes(source_id, source_type, path, name) VALUES(#{id}, 'Namespace', '#{path}', '#{path}')")
execute("INSERT INTO routes(source_id, source_type, path, name, created_at, updated_at) VALUES(#{id}, 'Namespace', '#{path}', '#{path}', NOW(), NOW())")
end
def set_notification_email(user_id)
......
# frozen_string_literal: true
require 'rails_helper'
describe 'Group Issue Boards', :js do
include BoardHelpers
let(:group) { create(:group) }
let(:user) { create(:group_member, user: create(:user), group: group ).user }
let!(:project_1) { create(:project, :public, group: group) }
let!(:project_2) { create(:project, :public, group: group) }
let!(:project_1_label) { create(:label, project: project_1, name: 'Development 1') }
let!(:project_2_label) { create(:label, project: project_2, name: 'Development 2') }
let!(:group_label) { create(:group_label, title: 'Bug', description: 'Fusce consequat', group: group) }
let!(:issue_1) { create(:labeled_issue, project: project_1, relative_position: 1) }
let!(:issue_2) { create(:labeled_issue, project: project_2, relative_position: 2) }
let(:board) { create(:board, group: group) }
let!(:list) { create(:list, board: board, label: project_1_label, position: 0) }
let(:card) { find('.board:nth-child(1)').first('.board-card') }
before do
sign_in(user)
visit group_board_path(group, board)
wait_for_requests
end
context 'labels' do
it 'only shows valid labels for the issue project and group' do
click_card(card)
page.within('.labels') do
click_link 'Edit'
wait_for_requests
page.within('.selectbox') do
expect(page).to have_content(project_1_label.title)
expect(page).to have_content(group_label.title)
expect(page).not_to have_content(project_2_label.title)
end
end
end
end
end
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