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
00da2df8
Commit
00da2df8
authored
Sep 09, 2020
by
David O'Regan
Committed by
Olena Horal-Koretska
Sep 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add help text for type select
parent
2ff32a4e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
app/views/shared/issuable/form/_type_selector.html.haml
app/views/shared/issuable/form/_type_selector.html.haml
+8
-3
changelogs/unreleased/230857-incident-type-selector-help.yml
changelogs/unreleased/230857-incident-type-selector-help.yml
+4
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/features/issues/user_creates_issue_spec.rb
spec/features/issues/user_creates_issue_spec.rb
+7
-3
No files found.
app/views/shared/issuable/form/_type_selector.html.haml
View file @
00da2df8
.form-group.row.gl-mb-0
=
form
.
label
:type
,
'Type'
,
class:
'col-form-label col-sm-2'
.col-sm-10
.issuable-form-select-holder.selectbox.form-group
.issuable-form-select-holder.selectbox.form-group
.gl-mb-0
.dropdown.js-issuable-type-filter-dropdown-wrap
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.dropdown-
label
%span
.dropdown-
toggle-text.is-default
=
type
.
capitalize
||
_
(
"Select type"
)
=
icon
(
'chevron-down'
)
.dropdown-menu.dropdown-menu-selectable.dropdown-select
...
...
@@ -18,5 +18,10 @@
=
link_to
new_project_issue_path
(
@project
),
class:
(
"is-active"
if
type
===
'issue'
)
do
=
_
(
"Issue"
)
%li
.js-filter-issuable-type
=
link_to
new_project_issue_path
(
@project
,
{
'issue[issue_type]'
:
'incident'
,
issuable_template:
'incident'
}),
class:
(
"is-active"
if
type
===
'incident'
)
do
=
link_to
new_project_issue_path
(
@project
,
{
issuable_template:
'incident'
,
issue:
{
issue_type:
'incident'
}
}),
class:
(
"is-active"
if
type
===
'incident'
)
do
=
_
(
"Incident"
)
-
if
type
===
'incident'
%p
.form-text.text-muted
-
incident_docs_url
=
help_page_path
(
'operations/incident_management/incidents.md'
,
anchor:
'create-and-manage-incidents-in-gitlab'
)
-
incident_docs_start
=
'<a href="%{url}" target="_blank" rel="noopener noreferrer">'
.
html_safe
%
{
url:
incident_docs_url
}
=
_
(
'A %{incident_docs_start}modified issue%{incident_docs_end} to guide the resolution of incidents.'
).
html_safe
%
{
incident_docs_start:
incident_docs_start
,
incident_docs_end:
'</a>'
.
html_safe
}
changelogs/unreleased/230857-incident-type-selector-help.yml
0 → 100644
View file @
00da2df8
title
:
Add help text to incident type select on new issue form
merge_request
:
41567
author
:
type
:
changed
locale/gitlab.pot
View file @
00da2df8
...
...
@@ -1105,6 +1105,9 @@ msgstr ""
msgid ":%{startLine} to %{endLine}"
msgstr ""
msgid "A %{incident_docs_start}modified issue%{incident_docs_end} to guide the resolution of incidents."
msgstr ""
msgid "A 'Runner' is a process which runs a job. You can set up as many Runners as you need."
msgstr ""
...
...
spec/features/issues/user_creates_issue_spec.rb
View file @
00da2df8
...
...
@@ -196,7 +196,7 @@ RSpec.describe "User creates issue" do
end
it
'pre-fills the issue type dropdown with issue type'
do
expect
(
find
(
'.js-issuable-type-filter-dropdown-wrap .dropdown-
label
'
)).
to
have_content
(
'Issue'
)
expect
(
find
(
'.js-issuable-type-filter-dropdown-wrap .dropdown-
toggle-text
'
)).
to
have_content
(
'Issue'
)
end
it
'does not hide the milestone select'
do
...
...
@@ -208,11 +208,11 @@ RSpec.describe "User creates issue" do
let
(
:project
)
{
create
(
:project
)
}
before
do
visit
new_project_issue_path
(
project
,
{
'issue[issue_type]'
:
'incident'
,
issuable_template:
'incident'
})
visit
new_project_issue_path
(
project
,
{
issuable_template:
'incident'
,
issue:
{
issue_type:
'incident'
}
})
end
it
'pre-fills the issue type dropdown with incident type'
do
expect
(
find
(
'.js-issuable-type-filter-dropdown-wrap .dropdown-
label
'
)).
to
have_content
(
'Incident'
)
expect
(
find
(
'.js-issuable-type-filter-dropdown-wrap .dropdown-
toggle-text
'
)).
to
have_content
(
'Incident'
)
end
it
'hides the epic select'
do
...
...
@@ -226,6 +226,10 @@ RSpec.describe "User creates issue" do
it
'hides the weight input'
do
expect
(
page
).
not_to
have_selector
(
'.qa-issuable-weight-input'
)
end
it
'shows the incident help text'
do
expect
(
page
).
to
have_text
(
'A modified issue to guide the resolution of incidents.'
)
end
end
context
'suggestions'
,
:js
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