Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ed6bf343
Commit
ed6bf343
authored
May 25, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed create new label form in issue form not working for sub-group projects
Closes #32906
parent
7c7fe22c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
app/views/shared/issuable/_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+1
-1
changelogs/unreleased/issuable-form-create-label-sub-groups.yml
...logs/unreleased/issuable-form-create-label-sub-groups.yml
+4
-0
spec/features/issues/form_spec.rb
spec/features/issues/form_spec.rb
+31
-0
No files found.
app/views/shared/issuable/_label_dropdown.html.haml
View file @
ed6bf343
...
...
@@ -9,7 +9,7 @@
-
selected
=
local_assigns
.
fetch
(
:selected
,
nil
)
-
selected_toggle
=
local_assigns
.
fetch
(
:selected_toggle
,
nil
)
-
dropdown_title
=
local_assigns
.
fetch
(
:dropdown_title
,
"Filter by label"
)
-
dropdown_data
=
{
toggle:
'dropdown'
,
field_name:
"label_name[]"
,
show_no:
"true"
,
show_any:
"true"
,
namespace_path:
@project
.
try
(
:namespace
).
try
(
:path
),
project_path:
@project
.
try
(
:path
),
labels:
labels_filter_path
,
default_label:
"Labels"
}
-
dropdown_data
=
{
toggle:
'dropdown'
,
field_name:
"label_name[]"
,
show_no:
"true"
,
show_any:
"true"
,
namespace_path:
@project
.
try
(
:namespace
).
try
(
:
full_
path
),
project_path:
@project
.
try
(
:path
),
labels:
labels_filter_path
,
default_label:
"Labels"
}
-
dropdown_data
.
merge!
(
data_options
)
-
classes
<<
'js-extra-options'
if
extra_options
-
classes
<<
'js-filter-submit'
if
filter_submit
...
...
changelogs/unreleased/issuable-form-create-label-sub-groups.yml
0 → 100644
View file @
ed6bf343
---
title
:
Fixed create new label form in issue form not working for sub-group projects
merge_request
:
author
:
spec/features/issues/form_spec.rb
View file @
ed6bf343
...
...
@@ -219,6 +219,37 @@ describe 'New/edit issue', :feature, :js do
end
end
describe
'sub-group project'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:nested_group_1
)
{
create
(
:group
,
parent:
group
)
}
let
(
:sub_group_project
)
{
create
(
:empty_project
,
group:
nested_group_1
)
}
before
do
sub_group_project
.
add_master
(
user
)
visit
new_namespace_project_issue_path
(
sub_group_project
.
namespace
,
sub_group_project
)
end
it
'creates new label from dropdown'
do
click_button
'Labels'
click_link
'Create new label'
page
.
within
'.dropdown-new-label'
do
fill_in
'new_label_name'
,
with:
'test label'
first
(
'.suggest-colors-dropdown a'
).
click
click_button
'Create'
wait_for_requests
end
page
.
within
'.dropdown-menu-labels'
do
expect
(
page
).
to
have_link
'test label'
end
end
end
def
before_for_selector
(
selector
)
js
=
<<-
JS
.
strip_heredoc
(function(selector) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment