From fbba587fd8c3ab1094eefe53139db48dc6724f90 Mon Sep 17 00:00:00 2001 From: Mark Fletcher Date: Mon, 17 Jul 2017 14:51:00 +0700 Subject: Fix label creation from new list for subgroup projects --- app/views/shared/issuable/_search_bar.html.haml | 2 +- changelogs/unreleased/35181-cannot-create-label-from-board-page.yml | 4 ++++ spec/features/boards/boards_spec.rb | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelogs/unreleased/35181-cannot-create-label-from-board-page.yml diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index bdb573cb8fd..6f0b7600698 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -98,7 +98,7 @@ - if type == :boards - if can?(current_user, :admin_list, @project) .dropdown.prepend-left-10#js-add-list - %button.btn.btn-create.btn-inverted.js-new-board-list{ type: "button", data: { toggle: "dropdown", labels: labels_filter_path, namespace_path: @project.try(:namespace).try(:path), project_path: @project.try(:path) } } + %button.btn.btn-create.btn-inverted.js-new-board-list{ type: "button", data: { toggle: "dropdown", labels: labels_filter_path, namespace_path: @project.try(:namespace).try(:full_path), project_path: @project.try(:path) } } Add list .dropdown-menu.dropdown-menu-paging.dropdown-menu-align-right.dropdown-menu-issues-board-new.dropdown-menu-selectable = render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" } diff --git a/changelogs/unreleased/35181-cannot-create-label-from-board-page.yml b/changelogs/unreleased/35181-cannot-create-label-from-board-page.yml new file mode 100644 index 00000000000..4afe603720d --- /dev/null +++ b/changelogs/unreleased/35181-cannot-create-label-from-board-page.yml @@ -0,0 +1,4 @@ +--- +title: Fix label creation from new list for subgroup projects +merge_request: +author: diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb index 3d7e26c7e19..b939fb5e89e 100644 --- a/spec/features/boards/boards_spec.rb +++ b/spec/features/boards/boards_spec.rb @@ -3,7 +3,8 @@ require 'rails_helper' describe 'Issue Boards', feature: true, js: true do include DragTo - let(:project) { create(:empty_project, :public) } + let(:group) { create(:group, :nested) } + let(:project) { create(:empty_project, :public, namespace: group) } let(:board) { create(:board, project: project) } let(:user) { create(:user) } let!(:user2) { create(:user) } -- cgit v1.2.1