2020-05-27 03:08:26 +00:00
---
stage: Plan
group: Project Management
2020-11-26 06:09:20 +00:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-05-27 03:08:26 +00:00
---
2021-06-23 15:07:50 +00:00
# Managing issues **(FREE)**
2019-07-04 00:55:35 +00:00
[GitLab Issues ](index.md ) are the fundamental medium for collaborating on ideas and
2020-11-17 09:09:23 +00:00
planning work in GitLab.
Key actions for issues include:
- [Creating issues ](#create-a-new-issue )
- [Moving issues ](#moving-issues )
- [Closing issues ](#closing-issues )
- [Deleting issues ](#deleting-issues )
- [Promoting issues ](#promote-an-issue-to-an-epic ) ** (PREMIUM)**
2019-07-04 00:55:35 +00:00
2020-06-09 18:08:28 +00:00
## Create a new issue
2019-07-04 00:55:35 +00:00
2020-12-17 21:09:57 +00:00
When you create a new issue, you are prompted to fill in the [data and fields of the issue ](issue_data_and_actions.md ),
2020-06-09 18:08:28 +00:00
as illustrated below. If you know the values you want to assign to an issue, you can use the
2020-12-17 21:09:57 +00:00
[Quick actions ](../quick_actions.md ) feature to input values.
2019-07-04 00:55:35 +00:00
2020-06-09 18:08:28 +00:00
While creating an issue, you can associate it to an existing epic from current group by
selecting it using **Epic** dropdown.
2019-07-04 00:55:35 +00:00
2020-06-09 18:08:28 +00:00
### Accessing the New Issue form
2019-07-04 00:55:35 +00:00
2020-12-17 21:09:57 +00:00
There are many ways to get to the New Issue form from a project's page:
2019-07-04 00:55:35 +00:00
- Navigate to your **Project's Dashboard** > **Issues** > **New Issue** :
![New issue from the issue list view ](img/new_issue_from_tracker_list.png )
2020-11-17 00:09:16 +00:00
- From an **open issue** in your project, click the vertical ellipsis (**{ellipsis_v}**) button
to open a dropdown menu, and then click **New Issue** to create a new issue in the same project:
2019-07-04 00:55:35 +00:00
2020-11-17 00:09:16 +00:00
![New issue from an open issue ](img/new_issue_from_open_issue_v13_6.png )
2019-07-04 00:55:35 +00:00
- From your **Project's Dashboard** , click the plus sign (**+**) to open a dropdown
menu with a few options. Select **New Issue** to create an issue in that project:
![New issue from a project's dashboard ](img/new_issue_from_projects_dashboard.png )
2021-08-19 18:10:32 +00:00
- From an **issue board** , create a new issue by clicking on the plus sign (**+**) at the top of a list.
2019-07-04 00:55:35 +00:00
It opens a new issue for that project, pre-labeled with its respective list.
![From the issue board ](img/new_issue_from_issue_board.png )
2020-06-09 18:08:28 +00:00
### Elements of the New Issue form
2020-07-17 06:09:11 +00:00
> Ability to add the new issue to an epic [was introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13847) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.1.
2020-06-09 18:08:28 +00:00
![New issue from the issues list ](img/new_issue_v13_1.png )
When you're creating a new issue, these are the fields you can fill in:
- Title
- Description
2021-07-30 00:10:03 +00:00
- Checkbox to make the issue [confidential ](confidential_issues.md )
2020-06-09 18:08:28 +00:00
- Assignee
- Weight
2021-05-17 15:10:15 +00:00
- [Epic ](../../group/epics/index.md )
2020-06-09 18:08:28 +00:00
- Due date
- Milestone
- Labels
2021-04-21 06:09:28 +00:00
### New issue from the group-level issue tracker
2019-07-04 00:55:35 +00:00
2021-04-21 06:09:28 +00:00
To visit the issue tracker for all projects in your group:
2019-07-04 00:55:35 +00:00
2021-04-21 06:09:28 +00:00
1. Go to the group dashboard.
2021-09-08 18:11:23 +00:00
1. On the left sidebar, select **Issues** .
2021-04-21 06:09:28 +00:00
1. In the top-right, select the **Select project to create issue** button.
2021-04-22 15:09:56 +00:00
1. Select the project you'd like to create an issue for. The button now reflects the selected
project.
1. Select the button to create an issue in the selected project.
2021-04-21 06:09:28 +00:00
![Select project to create issue ](img/select_project_from_group_level_issue_tracker_v13_11.png )
2019-07-04 00:55:35 +00:00
2020-12-17 21:09:57 +00:00
The project you selected most recently becomes the default for your next visit.
This should save you a lot of time and clicks, if you mostly create issues for the same project.
2019-07-04 00:55:35 +00:00
2020-07-17 06:09:11 +00:00
### New issue via Service Desk
2019-07-04 00:55:35 +00:00
Enable [Service Desk ](../service_desk.md ) for your project and offer email support.
2021-04-21 06:09:28 +00:00
Now, when your customer sends a new email, a new issue can be created in
2019-07-04 00:55:35 +00:00
the appropriate project and followed up from there.
### New issue via email
A link to **Email a new issue to this project** is displayed at the bottom of a project's
2020-12-17 21:09:57 +00:00
**Issues List** page. The link is shown only if your GitLab instance has [incoming email ](../../../administration/incoming_email.md )
configured and there is at least one issue in the issue list.
2019-07-04 00:55:35 +00:00
![Bottom of a project issues page ](img/new_issue_from_email.png )
When you click this link, an email address is generated and displayed, which should be used
by **you only** , to create issues in this project. You can save this address as a
2020-12-17 21:09:57 +00:00
contact in your email client for quick access.
2019-07-04 00:55:35 +00:00
2020-12-04 21:09:29 +00:00
WARNING:
2019-07-04 00:55:35 +00:00
This is a private email address, generated just for you. **Keep it to yourself** ,
as anyone who knows it can create issues or merge requests as if they
2020-12-17 21:09:57 +00:00
were you. If the address is compromised, or you want to regenerate it,
click **Email a new issue to this project** , followed by **reset it** .
2019-07-04 00:55:35 +00:00
2020-12-17 21:09:57 +00:00
Sending an email to this address creates a new issue associated with your account for
2019-07-04 00:55:35 +00:00
this project, where:
- The email subject becomes the issue title.
- The email body becomes the issue description.
- [Markdown ](../../markdown.md ) and [quick actions ](../quick_actions.md ) are supported.
2020-12-04 21:09:29 +00:00
NOTE:
2019-07-04 00:55:35 +00:00
In GitLab 11.7, we updated the format of the generated email address. However the
older format is still supported, allowing existing aliases or contacts to continue working.
### New issue via URL with prefilled fields
2020-12-17 21:09:57 +00:00
To link directly to the new issue page with prefilled fields, use query
string parameters in a URL. You can embed a URL in an external
2021-05-05 12:10:33 +00:00
HTML page to create issues with certain
2020-12-17 21:09:57 +00:00
fields prefilled.
2019-07-04 00:55:35 +00:00
2020-05-08 09:09:39 +00:00
| Field | URL Parameter Name | Notes |
|----------------------|-----------------------|-------------------------------------------------------|
| title | `issue[title]` | |
2021-05-05 12:10:33 +00:00
| description | `issue[description]` | Cannot be used at the same time as `issuable_template` . |
| description template | `issuable_template` | Cannot be used at the same time as `issue[description]` . |
| issue type | `issue[issue_type]` | Either `incident` or `issue` . |
| confidential | `issue[confidential]` | Parameter value must be `true` to set to confidential. |
2019-07-04 00:55:35 +00:00
Follow these examples to form your new issue URL with prefilled fields.
- For a new issue in the GitLab Community Edition project with a pre-filled title
2020-05-22 03:08:28 +00:00
and a pre-filled description, the URL would be `https://gitlab.com/gitlab-org/gitlab-foss/-/issues/new?issue[title]=Validate%20new%20concept&issue[description]=Research%20idea`
2019-07-04 00:55:35 +00:00
- For a new issue in the GitLab Community Edition project with a pre-filled title
2020-05-22 03:08:28 +00:00
and a pre-filled description template, the URL would be `https://gitlab.com/gitlab-org/gitlab-foss/-/issues/new?issue[title]=Validate%20new%20concept&issuable_template=Research%20proposal`
2020-05-08 09:09:39 +00:00
- For a new issue in the GitLab Community Edition project with a pre-filled title,
2020-05-22 03:08:28 +00:00
a pre-filled description, and the confidential flag set, the URL would be `https://gitlab.com/gitlab-org/gitlab-foss/-/issues/new?issue[title]=Validate%20new%20concept&issue[description]=Research%20idea&issue[confidential]=true`
2019-07-04 00:55:35 +00:00
2021-05-12 21:10:13 +00:00
## Bulk edit issues at the project level
> - Assigning epic ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/210470) in GitLab 13.2.
> - Editing health status [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218395) in GitLab 13.2.
> - Editing iteration [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196806) in GitLab 13.9.
Users with permission level of [Reporter or higher ](../../permissions.md ) can manage issues.
When bulk editing issues in a project, you can edit the following attributes:
- Status (open/closed)
- Assignee
- [Epic ](../../group/epics/index.md )
- [Milestone ](../milestones/index.md )
- [Labels ](../labels.md )
- [Health status ](#health-status )
- Notification subscription
- [Iteration ](../../group/iterations/index.md )
To update multiple project issues at the same time:
1. In a project, go to **Issues > List** .
1. Click **Edit issues** . A sidebar on the right-hand side of your screen appears with editable fields.
2021-05-14 12:10:58 +00:00
1. Select the checkboxes next to each issue you want to edit.
1. Select the appropriate fields and their values from the sidebar.
1. Click **Update all** .
## Bulk edit issues at the group level
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7249) in GitLab 12.1.
> - Assigning epic ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/210470) in GitLab 13.2.
> - Editing health status [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218395) in GitLab 13.2.
> - Editing iteration [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196806) in GitLab 13.9.
Users with permission level of [Reporter or higher ](../../permissions.md ) can manage issues.
When bulk editing issues in a group, you can edit the following attributes:
- [Epic ](../../group/epics/index.md )
- [Milestone ](../milestones/index.md )
- [Labels ](../labels.md )
- [Health status ](#health-status )
- [Iteration ](../../group/iterations/index.md )
To update multiple project issues at the same time:
1. In a group, go to **Issues > List** .
1. Click **Edit issues** . A sidebar on the right-hand side of your screen appears with editable fields.
2021-05-12 21:10:13 +00:00
1. Select the checkboxes next to each issue you want to edit.
1. Select the appropriate fields and their values from the sidebar.
1. Click **Update all** .
2021-03-24 15:09:19 +00:00
## Moving issues
2019-07-04 00:55:35 +00:00
2020-12-17 21:09:57 +00:00
Moving an issue copies it to the target project, and closes it in the originating project.
The original issue is not deleted. A system note, which indicates
where it came from and went to, is added to both issues.
2019-07-04 00:55:35 +00:00
The "Move issue" button is at the bottom of the right-sidebar when viewing the issue.
![move issue - button ](img/sidebar_move_issue.png )
2021-03-24 15:09:19 +00:00
### Moving issues in bulk **(FREE SELF)**
2019-07-04 06:24:39 +00:00
2020-12-17 21:09:57 +00:00
If you have advanced technical skills you can also bulk move all the issues from
one project to another in the rails console. The below script moves all issues
that are not in status **closed** from one project to another.
2019-07-04 06:24:39 +00:00
2020-04-21 15:21:10 +00:00
To access rails console run `sudo gitlab-rails console` on the GitLab server and run the below
2020-12-09 12:09:42 +00:00
script. Please be sure to change `project` , `admin_user` , and `target_project` to your values.
2021-09-28 18:11:27 +00:00
We do also recommend [creating a backup ](../../../raketasks/backup_restore.md ) before
2020-04-21 15:21:10 +00:00
attempting any changes in the console.
2019-07-04 06:24:39 +00:00
```ruby
project = Project.find_by_full_path('full path of the project where issues are moved from')
issues = project.issues
admin_user = User.find_by_username('username of admin user') # make sure user has permissions to move the issues
target_project = Project.find_by_full_path('full path of target project where issues moved to')
issues.each do |issue|
if issue.state != "closed" & & issue.moved_to.nil?
Issues::MoveService.new(project, admin_user).execute(issue, target_project)
else
puts "issue with id: #{issue.id} and title: #{issue.title} was not moved"
end
end; nil
```
2020-06-09 18:08:28 +00:00
## Closing issues
2019-07-04 00:55:35 +00:00
When you decide that an issue is resolved, or no longer needed, you can close the issue
using the close button:
2020-11-17 00:09:16 +00:00
![close issue - button ](img/button_close_issue_v13_6.png )
2019-07-04 00:55:35 +00:00
2021-08-19 18:10:32 +00:00
You can also close an issue from the [issue boards ](../issue_board.md ) by dragging an issue card
2019-07-04 00:55:35 +00:00
from its list and dropping it into the **Closed** list.
2021-08-19 18:10:32 +00:00
![close issue from the issue board ](img/close_issue_from_board.gif )
2019-07-04 00:55:35 +00:00
### Closing issues automatically
2020-12-17 21:09:57 +00:00
When a commit or merge request resolves issues, the issues
can be closed automatically when the commit reaches the project's default branch.
2019-07-04 00:55:35 +00:00
If a commit message or merge request description contains text matching a [defined pattern ](#default-closing-pattern ),
2020-12-17 21:09:57 +00:00
all issues referenced in the matched text are closed. This happens when the commit
2021-03-17 21:11:29 +00:00
is pushed to a project's [**default** branch ](../repository/branches/default.md ),
2019-07-04 00:55:35 +00:00
or when a commit or merge request is merged into it.
For example, if `Closes #4, #6, Related to #5` is included in a Merge Request
2020-12-17 21:09:57 +00:00
description, issues `#4` and `#6` are closed automatically when the MR is merged, but not `#5` .
2019-07-04 00:55:35 +00:00
Using `Related to` flags `#5` as a [related issue ](related_issues.md ),
2020-12-17 21:09:57 +00:00
but is not closed automatically.
2019-07-04 00:55:35 +00:00
2021-04-21 06:09:28 +00:00
![merge request closing issue when merged ](img/merge_request_closes_issue_v13_11.png )
2019-07-04 00:55:35 +00:00
If the issue is in a different repository than the MR, add the full URL for the issue(s):
2020-05-19 18:08:11 +00:00
```markdown
2019-07-04 00:55:35 +00:00
Closes #4 , #6 , and https://gitlab.com/< username > /< projectname > /issues/< xxx >
```
2020-12-17 21:09:57 +00:00
For performance reasons, automatic issue closing is disabled for the very first
push from an existing repository.
2019-07-04 00:55:35 +00:00
#### Default closing pattern
2020-12-17 21:09:57 +00:00
When not specified, this default issue closing pattern is used:
2019-07-04 00:55:35 +00:00
2020-01-30 15:09:15 +00:00
```shell
2020-04-21 15:21:10 +00:00
\b((?:[Cc]los(?:e[sd]?|ing)|\b[Ff]ix(?:e[sd]|ing)?|\b[Rr]esolv(?:e[sd]?|ing)|\b[Ii]mplement(?:s|ed|ing)?)(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?: *,? +and +| * ,? *)?)|([A-Z][A-Z0-9_]+-\d+))+)
2019-07-04 00:55:35 +00:00
```
This translates to the following keywords:
- Close, Closes, Closed, Closing, close, closes, closed, closing
- Fix, Fixes, Fixed, Fixing, fix, fixes, fixed, fixing
- Resolve, Resolves, Resolved, Resolving, resolve, resolves, resolved, resolving
- Implement, Implements, Implemented, Implementing, implement, implements, implemented, implementing
2020-12-16 00:09:58 +00:00
Note that `%{issue_ref}` is a complex regular expression defined inside the GitLab
2019-07-04 00:55:35 +00:00
source code that can match references to:
- A local issue (`#123`).
- A cross-project issue (`group/project#123`).
- A link to an issue (`https://gitlab.example.com/group/project/issues/123`).
For example the following commit message:
2020-02-03 03:08:30 +00:00
```plaintext
2019-07-04 00:55:35 +00:00
Awesome commit message
Fix #20 , Fixes #21 and Closes group/otherproject#22.
This commit is also related to #17 and fixes #18 , #19
and https://gitlab.example.com/group/otherproject/issues/23.
```
2020-12-17 21:09:57 +00:00
closes `#18` , `#19` , `#20` , and `#21` in the project this commit is pushed to,
as well as `#22` and `#23` in `group/otherproject` . `#17` is not closed as it does
2019-07-04 00:55:35 +00:00
not match the pattern. It works with multi-line commit messages as well as one-liners
when used from the command line with `git commit -m` .
2020-01-08 00:07:43 +00:00
#### Disabling automatic issue closing
2020-05-25 21:08:00 +00:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/19754) in GitLab 12.7.
2020-01-08 00:07:43 +00:00
The automatic issue closing feature can be disabled on a per-project basis
2020-12-17 21:09:57 +00:00
in the [project's repository settings ](../settings/index.md ). Referenced
issues are still displayed, but are not closed automatically.
2020-01-08 00:07:43 +00:00
![disable issue auto close - settings ](img/disable_issue_auto_close.png )
2021-05-24 18:10:28 +00:00
The automatic issue closing is also disabled in a project if the project has the issue tracker
disabled. If you want to enable automatic issue closing, make sure to
[enable GitLab Issues ](../settings/index.md#sharing-and-permissions ).
2020-01-08 00:07:43 +00:00
This only applies to issues affected by new merge requests or commits. Already
2021-05-24 18:10:28 +00:00
closed issues remain as-is.
If issue tracking is enabled, disabling automatic issue closing only applies to merge requests
attempting to automatically close issues within the same project.
Merge requests in other projects can still close another project's issues.
2020-01-08 00:07:43 +00:00
2021-01-28 06:08:59 +00:00
#### Customizing the issue closing pattern **(FREE SELF)**
2019-07-04 00:55:35 +00:00
2019-07-04 06:24:39 +00:00
In order to change the default issue closing pattern, GitLab administrators must edit the
2019-07-04 00:55:35 +00:00
[`gitlab.rb` or `gitlab.yml` file ](../../../administration/issue_closing_pattern.md )
of your installation.
2021-05-19 21:12:42 +00:00
## Change the issue type
2021-07-08 18:09:32 +00:00
Users with the [Developer role ](../../permissions.md )
2021-05-19 21:12:42 +00:00
can change an issue's type. To do this, edit the issue and select an issue type from the
**Issue type** selector menu:
- [Issue ](index.md )
- [Incident ](../../../operations/incident_management/index.md )
![Change the issue type ](img/issue_type_change_v13_12.png )
2020-06-09 18:08:28 +00:00
## Deleting issues
2019-07-04 00:55:35 +00:00
2021-05-31 18:09:56 +00:00
Users with the [Owner role ](../../permissions.md ) can delete an issue by
2021-04-21 06:09:28 +00:00
editing it and selecting **Delete issue** .
2019-07-04 00:55:35 +00:00
2021-04-21 06:09:28 +00:00
![delete issue - button ](img/delete_issue_v13_11.png )
2020-07-26 21:09:17 +00:00
2020-11-17 09:09:23 +00:00
## Promote an issue to an epic **(PREMIUM)**
2021-02-08 18:09:49 +00:00
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3777) in GitLab Ultimate 11.6.
> - Moved to GitLab Premium in 12.8.
> - Promoting issues to epics via the UI [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/233974) in GitLab Premium 13.6.
2020-11-17 09:09:23 +00:00
You can promote an issue to an epic in the immediate parent group.
To promote an issue to an epic:
1. In an issue, select the vertical ellipsis (**{ellipsis_v}**) button.
1. Select **Promote to epic** .
2021-03-09 21:09:15 +00:00
Alternatively, you can use the `/promote` [quick action ](../quick_actions.md#issues-merge-requests-and-epics ).
2020-11-17 09:09:23 +00:00
Read more about promoting an issue to an epic on the [Manage epics page ](../../group/epics/manage_epics.md#promote-an-issue-to-an-epic ).
2021-02-08 18:09:49 +00:00
## Add an issue to an iteration **(PREMIUM)**
2020-07-26 21:09:17 +00:00
2021-02-08 18:09:49 +00:00
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/216158) in GitLab 13.2.
> - Moved to GitLab Premium in 13.9.
2020-07-26 21:09:17 +00:00
To add an issue to an [iteration ](../../group/iterations/index.md ):
1. In an issue sidebar, click **Edit** next to **Iteration** . A dropdown appears.
1. Click an iteration you'd like to associate this issue with.
2020-08-05 18:09:49 +00:00
You can also use the `/iteration`
2021-03-09 21:09:15 +00:00
[quick action ](../quick_actions.md#issues-merge-requests-and-epics )
2020-08-05 18:09:49 +00:00
in a comment or description field.
2021-03-24 15:09:19 +00:00
## Real-time sidebar **(FREE SELF)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/17589) in GitLab 13.3.
Assignees in the sidebar are updated in real time. This feature is **disabled by default** .
2021-05-17 15:10:15 +00:00
To enable it, you need to enable [Action Cable in-app mode ](https://docs.gitlab.com/omnibus/settings/actioncable.html ).
2021-03-24 15:09:19 +00:00
## Similar issues
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22866) in GitLab 11.6.
To prevent duplication of issues for the same topic, GitLab searches for similar issues
when new issues are being created.
As you type in the title field of the **New Issue** page, GitLab searches titles and descriptions
across all issues to in the current project. Only issues you have access to are returned.
Up to five similar issues, sorted by most recently updated, are displayed below the title box.
[GraphQL ](../../../api/graphql/index.md ) must be enabled to use this feature.
![Similar issues ](img/similar_issues.png )
## Health status **(ULTIMATE)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/36427) in GitLab Ultimate 12.10.
> - Health status of closed issues [can't be edited](https://gitlab.com/gitlab-org/gitlab/-/issues/220867) in GitLab Ultimate 13.4 and later.
> - Issue health status visible in issue lists [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45141) in GitLab Ultimate 13.6.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/213567) in GitLab 13.7.
To help you track issue statuses, you can assign a status to each issue.
This marks issues as progressing as planned or needs attention to keep on schedule:
- On track (green)
- Needs attention (amber)
- At risk (red)
After an issue is closed, its health status can't be edited and the **Edit** button becomes disabled
until the issue is reopened.
2021-05-17 15:10:15 +00:00
You can then see issue statuses in the issues list and the epic tree.