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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
a6b41640
Commit
a6b41640
authored
Jun 29, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests
parent
bf40aab4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
17 deletions
+16
-17
app/assets/javascripts/users_select.js.coffee
app/assets/javascripts/users_select.js.coffee
+1
-2
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+1
-1
app/views/shared/issuable/_form.html.haml
app/views/shared/issuable/_form.html.haml
+3
-2
features/project/issues/issues.feature
features/project/issues/issues.feature
+1
-0
features/steps/project/forked_merge_requests.rb
features/steps/project/forked_merge_requests.rb
+5
-7
features/steps/project/issues/issues.rb
features/steps/project/issues/issues.rb
+2
-1
spec/features/issues/move_spec.rb
spec/features/issues/move_spec.rb
+1
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+2
-3
No files found.
app/assets/javascripts/users_select.js.coffee
View file @
a6b41640
...
...
@@ -155,7 +155,7 @@ class @UsersSelect
page
=
$
(
'body'
).
data
'page'
isIssueIndex
=
page
is
'projects:issues:index'
isMRIndex
=
page
is
page
is
'projects:merge_requests:index'
if
$dropdown
.
hasClass
(
'js-filter-bulk-update'
)
if
$dropdown
.
hasClass
(
'js-filter-bulk-update'
)
or
$dropdown
.
hasClass
(
'js-issuable-form-dropdown'
)
e
.
preventDefault
()
selectedId
=
user
.
id
return
...
...
@@ -171,7 +171,6 @@ class @UsersSelect
.
find
(
"input[name='
#{
$dropdown
.
data
(
'field-name'
)
}
']"
).
val
()
assignTo
(
selected
)
id
:
(
user
)
->
return
if
user
.
id
is
0
user
.
id
renderRow
:
(
user
)
->
username
=
if
user
.
username
then
"@
#{
user
.
username
}
"
else
""
...
...
app/helpers/issuables_helper.rb
View file @
a6b41640
...
...
@@ -9,7 +9,7 @@ module IssuablesHelper
def
multi_label_name
(
current_labels
,
default_label
)
# current_labels may be a string from before
if
current_labels
.
is_a?
(
Array
)
if
current_labels
.
is_a?
(
Array
)
&&
current_labels
.
any?
if
current_labels
.
count
>
1
"
#{
current_labels
[
0
]
}
+
#{
current_labels
.
count
-
1
}
more"
else
...
...
app/views/shared/issuable/_form.html.haml
View file @
a6b41640
...
...
@@ -52,10 +52,11 @@
=
f
.
label
:assignee_id
,
"Assignee"
,
class:
"control-label
#{
"col-lg-4"
if
has_due_date
}
"
.col-sm-10
{
class:
(
"col-lg-8"
if
has_due_date
)
}
.issuable-form-select-holder
-
project
=
@target_project
||
@project
-
if
issuable
.
assignee_id
=
hidden_field_tag
(
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
issuable
.
assignee_id
)
=
dropdown_tag
(
user_dropdown_label
(
issuable
.
assignee_id
,
"Assignee"
),
options:
{
toggle_class:
"js-user-search js-
filter-bulk-update
js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
placeholder:
"Search assignee"
,
data:
{
first_user:
(
current_user
.
username
if
current_user
),
null_user:
true
,
current_user:
true
,
project_id:
(
@project
.
id
if
@
project
),
selected:
issuable
.
assignee_id
,
field_name:
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
default_label:
"Assignee"
}
})
=
dropdown_tag
(
user_dropdown_label
(
issuable
.
assignee_id
,
"Assignee"
),
options:
{
toggle_class:
"js-user-search js-
issuable-form-dropdown
js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
placeholder:
"Search assignee"
,
data:
{
first_user:
(
current_user
.
username
if
current_user
),
null_user:
true
,
current_user:
true
,
project_id:
(
project
.
id
if
project
),
selected:
issuable
.
assignee_id
,
field_name:
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
default_label:
"Assignee"
}
})
.form-group.issue-milestone
=
f
.
label
:milestone_id
,
"Milestone"
,
class:
"control-label
#{
"col-lg-4"
if
has_due_date
}
"
.col-sm-10
{
class:
(
"col-lg-8"
if
has_due_date
)
}
...
...
features/project/issues/issues.feature
View file @
a6b41640
...
...
@@ -37,6 +37,7 @@ Feature: Project Issues
And
I submit new issue
"500 error on profile"
Then
I should see issue
"500 error on profile"
@javascript
Scenario
:
I
submit new unassigned issue with labels
Given project "Shop" has labels
:
"bug",
"feature",
"enhancement"
And
I click link
"New Issue"
...
...
features/steps/project/forked_merge_requests.rb
View file @
a6b41640
...
...
@@ -135,19 +135,17 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step
'I click "Assign to" dropdown"'
do
first
(
'.ajax-users-select'
).
click
click_button
'Assignee'
end
step
'I should see the target project ID in the input selector'
do
expect
(
page
).
to
have_selector
(
"input[data-project-id=
\"
#{
@project
.
id
}
\"
]"
)
expect
(
find
(
'.js-assignee-search'
)[
"data-project-id"
]).
to
eq
"
#{
@project
.
id
}
"
end
step
'I should see the users from the target project ID'
do
expect
(
page
).
to
have_selector
(
'.user-result'
,
visible:
true
,
count:
3
)
users
=
page
.
all
(
'.user-name'
)
expect
(
users
[
0
].
text
).
to
eq
'Unassigned'
expect
(
users
[
1
].
text
).
to
eq
current_user
.
name
expect
(
users
[
2
].
text
).
to
eq
@project
.
users
.
first
.
name
expect
(
page
).
to
have_content
'Unassigned'
expect
(
page
).
to
have_content
current_user
.
name
expect
(
page
).
to
have_content
@project
.
users
.
first
.
name
end
# Verify a link is generated against the correct project
...
...
features/steps/project/issues/issues.rb
View file @
a6b41640
...
...
@@ -82,7 +82,8 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
step
'I submit new issue "500 error on profile" with label \'bug\''
do
fill_in
"issue_title"
,
with:
"500 error on profile"
select
'bug'
,
from:
"Labels"
click_button
"Label"
click_link
"bug"
click_button
"Submit issue"
end
...
...
spec/features/issues/move_spec.rb
View file @
a6b41640
...
...
@@ -55,7 +55,7 @@ feature 'issue move to another project' do
first
(
'.select2-choice'
).
click
end
fill_in
(
's2id_autogen
2
_search'
,
with:
new_project_search
.
name
)
fill_in
(
's2id_autogen
1
_search'
,
with:
new_project_search
.
name
)
page
.
within
'.select2-drop'
do
expect
(
page
).
to
have_content
(
new_project_search
.
name
)
...
...
spec/features/issues_spec.rb
View file @
a6b41640
...
...
@@ -50,9 +50,8 @@ describe 'Issues', feature: true do
expect
(
page
).
to
have_content
"Assignee
#{
@user
.
name
}
"
first
(
'#s2id_issue_assignee_id'
).
click
sleep
2
# wait for ajax stuff to complete
first
(
'.user-result'
).
click
first
(
'.js-user-search'
).
click
click_link
'Unassigned'
click_button
'Save changes'
...
...
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