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
5107f6b3
Commit
5107f6b3
authored
Mar 22, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix linking to new issue with selected template
Fix
https://gitlab.com/gitlab-org/gitlab-ce/issues/26595
parent
6460489b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+1
-1
changelogs/unreleased/26595-fix-issue-preselected-template.yml
...elogs/unreleased/26595-fix-issue-preselected-template.yml
+4
-0
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+17
-0
No files found.
app/helpers/issuables_helper.rb
View file @
5107f6b3
...
...
@@ -251,6 +251,6 @@ module IssuablesHelper
end
def
selected_template
(
issuable
)
params
[
:issuable_template
]
if
issuable_templates
(
issuable
).
include?
(
params
[
:issuable_template
])
params
[
:issuable_template
]
if
issuable_templates
(
issuable
).
any?
{
|
template
|
template
[
:name
]
==
params
[
:issuable_template
]
}
end
end
changelogs/unreleased/26595-fix-issue-preselected-template.yml
0 → 100644
View file @
5107f6b3
---
title
:
Fix linking to new issue with selected template via url parameter
merge_request
:
author
:
spec/features/issues_spec.rb
View file @
5107f6b3
...
...
@@ -13,6 +13,13 @@ describe 'Issues', feature: true do
user2
=
create
(
:user
)
project
.
team
<<
[[
@user
,
user2
],
:developer
]
project
.
repository
.
create_file
(
@user
,
'.gitlab/issue_templates/bug.md'
,
'this is a test "bug" template'
,
message:
'added issue template'
,
branch_name:
'master'
)
end
describe
'Edit issue'
do
...
...
@@ -600,6 +607,16 @@ describe 'Issues', feature: true do
expect
(
page
.
find_field
(
"issue_description"
).
value
).
to
match
/\n\n$/
end
end
context
'form filled by URL parameters'
do
before
do
visit
new_namespace_project_issue_path
(
project
.
namespace
,
project
,
issuable_template:
'bug'
)
end
it
'fills in template'
do
expect
(
find
(
'.js-issuable-selector .dropdown-toggle-text'
)).
to
have_content
(
'bug'
)
end
end
end
describe
'new issue by email'
do
...
...
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