Commit 222d6ec8 authored by Phil Hughes's avatar Phil Hughes

Merge branch '313-okr-general-default-issue-template' into 'master'

Update issue description template UI settings

See merge request gitlab-org/gitlab!50421
parents a1f33b7b 26d01b90
...@@ -2,20 +2,18 @@ ...@@ -2,20 +2,18 @@
- expanded = expanded_by_default? - expanded = expanded_by_default?
%section.settings.issues-feature.no-animate#js-issue-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:issues_access_level) == 0)] } %section.settings.issues-feature.no-animate#js-issue-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:issues_access_level) == 0)] }
.settings-header .settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Default issue template') %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Default description template for issues')
%button.gl-button.btn.btn-default.js-settings-toggle= expanded ? _('Collapse') : _('Expand') %button.gl-button.btn.btn-default.js-settings-toggle= expanded ? _('Collapse') : _('Expand')
%p= _('Set a default template for issue descriptions.') - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/description_templates', anchor: 'setting-a-default-template-for-merge-requests-and-issues') }
%p#issue-settings-default-template-label= _('Set a default description template to be used for new issues. %{link_start}What are description templates?%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
.settings-content .settings-content
= form_for @project, remote: true, html: { multipart: true, class: "issue-settings-form" }, authenticity_token: true do |f| = form_for @project, remote: true, html: { multipart: true, class: "issue-settings-form" }, authenticity_token: true do |f|
%input{ type: 'hidden', name: 'update_section', value: 'js-issue-settings' } %input{ type: 'hidden', name: 'update_section', value: 'js-issue-settings' }
.row .row
.form-group.col-md-9 .form-group.col-md-9
= f.label :issues_template, class: 'label-bold' do = f.text_area :issues_template, class: "form-control", rows: 3, aria: { labelledby: 'issue-settings-default-template-label'}
= _('Default description template for issues')
= link_to sprite_icon('question-o'), help_page_path('user/project/description_templates'), target: '_blank'
= f.text_area :issues_template, class: "form-control", rows: 3
.text-secondary .text-secondary
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/markdown') } - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/markdown') }
= _('Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } = _('Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
= f.submit _('Save changes'), class: "gl-button btn btn-success" = f.submit _('Save changes'), class: "gl-button btn btn-success"
---
title: Update issue description templates UI settings
merge_request: 50421
author:
type: other
...@@ -19,14 +19,14 @@ RSpec.describe 'Project settings > Issues', :js do ...@@ -19,14 +19,14 @@ RSpec.describe 'Project settings > Issues', :js do
end end
it 'shows the Issues settings' do it 'shows the Issues settings' do
expect(page).to have_content('Set a default template for issue descriptions.') expect(page).to have_content('Set a default description template to be used for new issues.')
within('.sharing-permissions-form') do within('.sharing-permissions-form') do
find('.project-feature-controls[data-for="project[project_feature_attributes][issues_access_level]"] .project-feature-toggle').click find('.project-feature-controls[data-for="project[project_feature_attributes][issues_access_level]"] .project-feature-toggle').click
click_on('Save changes') click_on('Save changes')
end end
expect(page).not_to have_content('Set a default template for issue descriptions.') expect(page).not_to have_content('Set a default description template to be used for new issues.')
end end
end end
end end
...@@ -38,14 +38,14 @@ RSpec.describe 'Project settings > Issues', :js do ...@@ -38,14 +38,14 @@ RSpec.describe 'Project settings > Issues', :js do
end end
it 'does not show the Issues settings' do it 'does not show the Issues settings' do
expect(page).not_to have_content('Set a default template for issue descriptions.') expect(page).not_to have_content('Set a default description template to be used for new issues.')
within('.sharing-permissions-form') do within('.sharing-permissions-form') do
find('.project-feature-controls[data-for="project[project_feature_attributes][issues_access_level]"] .project-feature-toggle').click find('.project-feature-controls[data-for="project[project_feature_attributes][issues_access_level]"] .project-feature-toggle').click
click_on('Save changes') click_on('Save changes')
end end
expect(page).to have_content('Set a default template for issue descriptions.') expect(page).to have_content('Set a default description template to be used for new issues.')
end end
end end
......
...@@ -9040,9 +9040,6 @@ msgstr "" ...@@ -9040,9 +9040,6 @@ msgstr ""
msgid "Default initial branch name" msgid "Default initial branch name"
msgstr "" msgstr ""
msgid "Default issue template"
msgstr ""
msgid "Default project deletion protection" msgid "Default project deletion protection"
msgstr "" msgstr ""
...@@ -9586,6 +9583,9 @@ msgstr "" ...@@ -9586,6 +9583,9 @@ msgstr ""
msgid "Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}" msgid "Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}"
msgstr "" msgstr ""
msgid "Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}."
msgstr ""
msgid "Description template" msgid "Description template"
msgstr "" msgstr ""
...@@ -25402,7 +25402,7 @@ msgstr "" ...@@ -25402,7 +25402,7 @@ msgstr ""
msgid "Set .gitlab-ci.yml to enable or configure SAST security scanning using the GitLab managed template. You can [add variable overrides](https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings) to customize SAST settings." msgid "Set .gitlab-ci.yml to enable or configure SAST security scanning using the GitLab managed template. You can [add variable overrides](https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings) to customize SAST settings."
msgstr "" msgstr ""
msgid "Set a default template for issue descriptions." msgid "Set a default description template to be used for new issues. %{link_start}What are description templates?%{link_end}"
msgstr "" msgstr ""
msgid "Set a password on your account to pull or push via %{protocol}." msgid "Set a password on your account to pull or push via %{protocol}."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment