BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
eed79602
Commit
eed79602
authored
Sep 13, 2016
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issuable templates dropdown for forked projects
parent
d2370422
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
CHANGELOG
CHANGELOG
+1
-0
_form.html.haml
app/views/shared/issuable/_form.html.haml
+1
-1
issuable_templates_spec.rb
spec/features/projects/issuable_templates_spec.rb
+8
-4
No files found.
CHANGELOG
View file @
eed79602
...
...
@@ -7,6 +7,7 @@ v 8.12.0 (unreleased)
- Cleanup misalignments in Issue list view !6206
- Prune events older than 12 months. (ritave)
- Prepend blank line to `Closes` message on merge request linked to issue (lukehowell)
- Fix issues/merge-request templates dropdown for forked projects
- Filter tags by name !6121
- Update gitlab shell secret file also when it is empty. !3774 (glensc)
- Give project selection dropdowns responsive width, make non-wrapping.
...
...
app/views/shared/issuable/_form.html.haml
View file @
eed79602
...
...
@@ -19,7 +19,7 @@
=
dropdown_tag
(
title
,
options:
{
toggle_class:
'js-issuable-selector'
,
title:
title
,
filter:
true
,
placeholder:
'Filter'
,
footer_content:
true
,
data:
{
data:
issuable_template_names
,
field_name:
'issuable_template'
,
selected:
selected_template
(
issuable
),
project_path:
@project
.
path
,
namespace_path:
@
project
.
namespace
.
path
}
}
)
do
data:
{
data:
issuable_template_names
,
field_name:
'issuable_template'
,
selected:
selected_template
(
issuable
),
project_path:
ref_project
.
path
,
namespace_path:
ref_
project
.
namespace
.
path
}
}
)
do
%ul
.dropdown-footer-list
%li
%a
.reset-template
...
...
spec/features/projects/issuable_templates_spec.rb
View file @
eed79602
...
...
@@ -64,7 +64,7 @@ feature 'issuable templates', feature: true, js: true do
let
(
:template_content
)
{
'this is a test "feature-proposal" template'
}
let
(
:fork_user
)
{
create
(
:user
)
}
let
(
:fork_project
)
{
create
(
:project
,
:public
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:with_diffs
,
source_project:
fork_project
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:with_diffs
,
source_project:
fork_project
,
target_project:
project
)
}
background
do
logout
...
...
@@ -72,18 +72,22 @@ feature 'issuable templates', feature: true, js: true do
fork_project
.
team
<<
[
fork_user
,
:master
]
create
(
:forked_project_link
,
forked_to_project:
fork_project
,
forked_from_project:
project
)
login_as
fork_user
fork_
project
.
repository
.
commit_file
(
fork_user
,
'.gitlab/merge_request_templates/feature-proposal.md'
,
template_content
,
'added merge request template'
,
'master'
,
false
)
visit
edit_namespace_project_merge_request_path
fork_project
.
namespace
,
fork_
project
,
merge_request
project
.
repository
.
commit_file
(
fork_user
,
'.gitlab/merge_request_templates/feature-proposal.md'
,
template_content
,
'added merge request template'
,
'master'
,
false
)
visit
edit_namespace_project_merge_request_path
project
.
namespace
,
project
,
merge_request
fill_in
:'merge_request[title]'
,
with:
'test merge request title'
end
scenario
'user selects "feature-proposal" template'
do
context
'feature proposal template'
do
context
'template exists in target project'
do
scenario
'user selects template'
do
select_template
'feature-proposal'
wait_for_ajax
preview_template
save_changes
end
end
end
end
def
preview_template
click_link
'Preview'
...
...
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