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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
f042b085
Commit
f042b085
authored
May 22, 2015
by
Patricio Cano
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
parents
c17a15db
c4e48d27
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
6 deletions
+35
-6
CHANGELOG
CHANGELOG
+2
-1
app/helpers/selects_helper.rb
app/helpers/selects_helper.rb
+3
-2
app/views/projects/_issuable_form.html.haml
app/views/projects/_issuable_form.html.haml
+2
-2
app/views/projects/merge_requests/show/_context.html.haml
app/views/projects/merge_requests/show/_context.html.haml
+1
-1
features/project/forked_merge_requests.feature
features/project/forked_merge_requests.feature
+12
-0
features/steps/project/forked_merge_requests.rb
features/steps/project/forked_merge_requests.rb
+15
-0
No files found.
CHANGELOG
View file @
f042b085
...
...
@@ -5,6 +5,7 @@ v 7.12.0 (unreleased)
- Disabled expansion of top/bottom blobs for new file diffs
- Update Asciidoctor gem to version 1.5.2. (Jakub Jirutka)
- Fix resolving of relative links to repository files in AsciiDoc documents. (Jakub Jirutka)
- Use the user list from the target project in a merge request (Stan Hu)
v 7.11.2
- no changes
...
...
app/helpers/selects_helper.rb
View file @
f042b085
...
...
@@ -10,6 +10,7 @@ module SelectsHelper
any_user
=
opts
[
:any_user
]
||
false
email_user
=
opts
[
:email_user
]
||
false
first_user
=
opts
[
:first_user
]
&&
current_user
?
current_user
.
username
:
false
project
=
opts
[
:project
]
||
@project
html
=
{
class:
css_class
,
...
...
@@ -21,8 +22,8 @@ module SelectsHelper
}
unless
opts
[
:scope
]
==
:all
if
@
project
html
[
'data-project-id'
]
=
@
project
.
id
if
project
html
[
'data-project-id'
]
=
project
.
id
elsif
@group
html
[
'data-group-id'
]
=
@group
.
id
end
...
...
app/views/projects/_issuable_form.html.haml
View file @
f042b085
...
...
@@ -46,7 +46,7 @@
.col-sm-10
=
users_select_tag
(
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
placeholder:
'Select a user'
,
class:
'custom-form-control'
,
null_user:
true
,
selected:
issuable
.
assignee_id
)
selected:
issuable
.
assignee_id
,
project:
@target_project
||
@project
)
=
link_to
'Assign to me'
,
'#'
,
class:
'btn assign-to-me-link'
.form-group
...
...
app/views/projects/merge_requests/show/_context.html.haml
View file @
f042b085
...
...
@@ -9,7 +9,7 @@
none
.issuable-context-selectbox
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
=
users_select_tag
(
'merge_request[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@merge_request
.
assignee_id
,
null_user:
true
)
=
users_select_tag
(
'merge_request[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control js-select2 js-assignee'
,
selected:
@merge_request
.
assignee_id
,
project:
@target_project
,
null_user:
true
)
%div
.prepend-top-20.clearfix
.issuable-context-title
...
...
features/project/forked_merge_requests.feature
View file @
f042b085
...
...
@@ -38,3 +38,15 @@ Feature: Project Forked Merge Requests
Given
I visit project
"Forked Shop"
merge requests page
And
I click link
"New Merge Request"
Then
the target repository should be the original repository
@javascript
Scenario
:
I
see the users in the target project for a new merge request
Given
I logout
And
I sign in as an admin
And
I have a project forked off of
"Shop"
called
"Forked Shop"
Then
I visit project
"Forked Shop"
merge requests page
And
I click link
"New Merge Request"
And
I fill out a
"Merge Request On Forked Project"
merge request
When
I click
"Assign to"
dropdown"
Then
I should see the target project ID in the input selector
And
I should see the users from the target project ID
features/steps/project/forked_merge_requests.rb
View file @
f042b085
...
...
@@ -128,6 +128,21 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
page
.
should
have_select
(
"merge_request_target_project_id"
,
selected:
@project
.
path_with_namespace
)
end
step
'I click "Assign to" dropdown"'
do
first
(
'.ajax-users-select'
).
click
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
}
\"
]"
)
end
step
'I should see the users from the target project ID'
do
expect
(
page
).
to
have_selector
(
'.user-result'
,
visible:
true
,
count:
2
)
users
=
page
.
all
(
'.user-name'
)
users
[
0
].
text
.
should
==
'Unassigned'
users
[
1
].
text
.
should
==
@project
.
users
.
first
.
name
end
# Verify a link is generated against the correct project
def
verify_commit_link
(
container_div
,
container_project
)
# This should force a wait for the javascript to execute
...
...
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