Commit 73c3f7e3 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis
parent 99ac320d
...@@ -4,5 +4,8 @@ ...@@ -4,5 +4,8 @@
Issues Issues
.form-group .form-group
= f.label :issues_template, class: 'label-light' do = f.label :issues_template, class: 'label-light' do
Description template Default description template for issues
= link_to icon('question-circle'), help_page_path('user/project/description_templates', anchor: 'setting-a-default-template-for-issues-and-merge-requests'), target: '_blank'
= f.text_area :issues_template, class: "form-control", rows: 3 = f.text_area :issues_template, class: "form-control", rows: 3
.hint
Description parsed with #{link_to "GitLab Flavored Markdown", help_page_path('user/markdown'), target: '_blank'}.
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
.col-md-9 .col-md-9
%label.label-light %label.label-light
= label_tag :project_visibility, 'Project Visibility', class: 'label-light' = label_tag :project_visibility, 'Project Visibility', class: 'label-light'
= link_to "(?)", help_page_path("public_access/public_access") = link_to icon('question-circle'), help_page_path("public_access/public_access")
%span.help-block %span.help-block
.col-md-3.visibility-select-container .col-md-3.visibility-select-container
= render('projects/visibility_select', model_method: :visibility_level, form: f, selected_level: @project.visibility_level) = render('projects/visibility_select', model_method: :visibility_level, form: f, selected_level: @project.visibility_level)
......
...@@ -37,8 +37,11 @@ ...@@ -37,8 +37,11 @@
.form-group .form-group
= form.label :merge_requests_template, class: 'label-light' do = form.label :merge_requests_template, class: 'label-light' do
Description template Default description template for merge requests
= link_to icon('question-circle'), help_page_path('user/project/description_templates', anchor: 'setting-a-default-template-for-issues-and-merge-requests'), target: '_blank'
= form.text_area :merge_requests_template, class: "form-control", rows: 3 = form.text_area :merge_requests_template, class: "form-control", rows: 3
.hint
Description parsed with #{link_to "GitLab Flavored Markdown", help_page_path('user/markdown'), target: '_blank'}.
.form-group .form-group
= form.label :approvals_before_merge, class: 'label-light' do = form.label :approvals_before_merge, class: 'label-light' do
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
- [Account Security](user/profile/account/two_factor_authentication.md) Securing your account via two-factor authentication, etc. - [Account Security](user/profile/account/two_factor_authentication.md) Securing your account via two-factor authentication, etc.
- [API](api/README.md) Automate GitLab via a simple and powerful API. - [API](api/README.md) Automate GitLab via a simple and powerful API.
- [CI/CD](ci/README.md) GitLab Continuous Integration (CI) and Continuous Delivery (CD) getting started, `.gitlab-ci.yml` options, and examples. - [CI/CD](ci/README.md) GitLab Continuous Integration (CI) and Continuous Delivery (CD) getting started, `.gitlab-ci.yml` options, and examples.
- [Custom templates for issues and merge requests](customization/issue_and_merge_request_template.md) Pre-fill the description of issues and merge requests to your liking.
- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab. - [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
- [Container Registry](user/project/container_registry.md) Learn how to use GitLab Container Registry. - [Container Registry](user/project/container_registry.md) Learn how to use GitLab Container Registry.
- [GitLab basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab. - [GitLab basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
......
# Custom templates for issues and merge requests This document was moved to [description_templates](../user/project/description_templates.md#setting-a-default-template-for-issues-and-merge-requests).
_**Note:** Templates for merge requests were [introduced][ee-7478ece] in GitLab
EE 6.9. Templates for issues were [introduced][ee-28] in GitLab EE 8.1._
---
We all know that a properly submitted issue is more likely to be addressed in
a timely manner by the developers of a project.
Templates help filter out a lot of unnecessary noise from issues, and with
GitLab you can do that pretty easily.
## Issues template
_**Note:** Make sure that the issues feature is enabled in your project's
**Settings** otherwise the template won't show. This is the default behavior so
in most cases you should be fine._
To enable the template feature for your issues, go to your project's
**Settings** and fill in the _Description template_ text area under the
**Issues** feature.
Since GitLab issues support [Markdown](../markdown/markdown.md), you can use
special markup like headings.
![Issue template in project settings](img/issue_and_merge_request_template_issue_settings.png)
---
After you add the description, hit **Save** for the settings to take effect.
Now, every time a new issue is created, it will be pre-filled with the text you
entered in the template.
![Issue template - new issue](img/issue_and_merge_request_template_new_issue.png)
---
## Merge requests template
_**Note:** Make sure that the merge requests feature is enabled in your project's
**Settings** otherwise the template won't show. This is the default behavior so
in most cases you should be fine._
As with [issues](#issues-template), you can create a template for your merge
requests as well. Remember that GitLab supports [Markdown](../markdown/markdown.md)
in merge requests.
![Issue template in project settings](img/issue_and_merge_request_template_mr_settings.png)
---
From now on, any new merge request will be pre-filled with the template text.
![Issue template - new MR](img/issue_and_merge_request_template_new_mr.png)
[ee-28]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/28 "Merge Request for adding issues template"
[ee-7478ece]: https://gitlab.com/gitlab-org/gitlab-ee/commit/7478ece8b48e80782b5465b96c79f85cc91d391b "Commit that introduced merge requests templates"
...@@ -2,8 +2,12 @@ ...@@ -2,8 +2,12 @@
>[Introduced][ce-4981] in GitLab 8.11. >[Introduced][ce-4981] in GitLab 8.11.
We all know that a properly submitted issue is more likely to be addressed in
a timely manner by the developers of a project.
Description templates allow you to define context-specific templates for issue Description templates allow you to define context-specific templates for issue
and merge request description fields for your project. and merge request description fields for your project, as well as help filter
out a lot of unnecessary noise from issues.
## Overview ## Overview
...@@ -39,4 +43,34 @@ changes you made after picking the template and return it to its initial status. ...@@ -39,4 +43,34 @@ changes you made after picking the template and return it to its initial status.
![Description templates](img/description_templates.png) ![Description templates](img/description_templates.png)
## Setting a default template for issues and merge requests
>
**Notes:**
- This feature was introduced before [description templates](#overview) and is
available only for [GitLab Enterprise Starter][products]. It can be enabled
in the project's settings.
- Templates for issues were [introduced][ee-28] in GitLab EE 8.1.
- Templates for merge requests were [introduced][ee-7478ece] in GitLab EE 6.9.
The visibility of issues and/or merge requests should be set to either "Everyone
with access" or "Only team members" in your project's **Settings** otherwise the
template text areas won't show. This is the default behavior so in most cases
you should be fine.
Go to your project's **Settings** and fill in the "Default description template
for issues" and "Default description template for merge requests" text areas
for issues and merge requests respectively. Since GitLab issues and merge
request support [Markdown](../markdown.md), you can use special markup like
headings, lists, etc.
![Default description templates](img/description_templates_default_settings.png)
After you add the description, hit **Save changes** for the settings to take
effect. Now, every time a new issue or merge request is created, it will be
pre-filled with the text you entered in the template(s).
[ce-4981]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4981 [ce-4981]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4981
[ee-28]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/28 "Merge Request for adding issues template"
[ee-7478ece]: https://gitlab.com/gitlab-org/gitlab-ee/commit/7478ece8b48e80782b5465b96c79f85cc91d391b "Commit that introduced merge requests templates"
[products]: https://about.gitlab.com/products/
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