summaryrefslogtreecommitdiff
path: root/doc/user/project/issues/closing_issues.md
blob: 1d88745af9f3be44b77b5aae395296206f60923f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Closing Issues

Please read through the [GitLab Issue Documentation](index.md) for an overview on GitLab Issues.

## Directly

Whenever you decide that's no longer need for that issue,
close the issue using the close button:

![close issue - button](img/button_close_issue.png)

## Via Merge Request

When a merge request resolves the discussion over an issue, you can
make it close that issue(s) when merged.

All you need is to use a [keyword](automatic_issue_closing.md)
accompanying the issue number, add to the description of that MR.

In this example, the keyword "closes" prefixing the issue number will create a relationship
in such a way that the merge request will close the issue when merged. 

Mentioning various issues in the same line also works for this purpose:

```md
Closes #333, #444, #555 and #666
```

If the issue is in a different repository rather then the MR's,
add the full URL for that issue(s):

```md
Closes #333, #444, and https://gitlab.com/<username>/<projectname>/issues/<xxx>
```

All the following keywords will produce the same behaviour:

- Close, Closes, Closed, Closing, close, closes, closed, closing
- Fix, Fixes, Fixed, Fixing, fix, fixes, fixed, fixing
- Resolve, Resolves, Resolved, Resolving, resolve, resolves, resolved, resolving

![merge request closing issue when merged](img/merge_request_closes_issue.png)

If you use any other word before the issue number, the issue and the MR will
link to each other, but the MR will NOT close the issue(s) when merged.

![mention issues in MRs - closing and related](img/closing_and_related_issues.png)

## From the Issue Board

You can close an issue from [Issue Boards](../issue_board.md) by dragging an issue card
from its list and dropping into **Closed**.

![close issue from the Issue Board](img/close_issue_from_board.gif)

## Customizing the issue closing pattern

Alternatively, a GitLab **administrator** can
[customize the issue closing pattern](../../../administration/issue_closing_pattern.md).