@@ -147,9 +146,9 @@ Follow these examples to form your new issue URL with prefilled fields.
...
@@ -147,9 +146,9 @@ Follow these examples to form your new issue URL with prefilled fields.
## Moving Issues
## Moving Issues
Moving an issue will copy it to a new location (project), and close it in the old project,
Moving an issue copies it to the target project, and closes it in the originating project.
but it will not be deleted. There will also be a system note added to both issues
The original issue is not deleted. A system note, which indicates
indicating where it came from and went to.
where it came from and went to, is added to both issues.
The "Move issue" button is at the bottom of the right-sidebar when viewing the issue.
The "Move issue" button is at the bottom of the right-sidebar when viewing the issue.
...
@@ -157,7 +156,9 @@ The "Move issue" button is at the bottom of the right-sidebar when viewing the i
...
@@ -157,7 +156,9 @@ The "Move issue" button is at the bottom of the right-sidebar when viewing the i
### Moving Issues in Bulk
### Moving Issues in Bulk
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 will move all the issues from one project to another that are not in status **closed**.
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.
To access rails console run `sudo gitlab-rails console` on the GitLab server and run the below
To access rails console run `sudo gitlab-rails console` on the GitLab server and run the below
script. Please be sure to change `project`, `admin_user`, and `target_project` to your values.
script. Please be sure to change `project`, `admin_user`, and `target_project` to your values.
...
@@ -193,23 +194,18 @@ from its list and dropping it into the **Closed** list.
...
@@ -193,23 +194,18 @@ from its list and dropping it into the **Closed** list.
### Closing issues automatically
### Closing issues automatically
NOTE:
When a commit or merge request resolves issues, the issues
For performance reasons, automatic issue closing is disabled for the very first
can be closed automatically when the commit reaches the project's default branch.
push from an existing repository.
When a commit or merge request resolves one or more issues, it is possible to have
these issues closed automatically when the commit or merge request reaches the project's
default branch.
If a commit message or merge request description contains text matching a [defined pattern](#default-closing-pattern),
If a commit message or merge request description contains text matching a [defined pattern](#default-closing-pattern),
all issues referenced in the matched text will be closed. This happens when the commit
all issues referenced in the matched text are closed. This happens when the commit
is pushed to a project's [**default** branch](../repository/branches/index.md#default-branch),
is pushed to a project's [**default** branch](../repository/branches/index.md#default-branch),
or when a commit or merge request is merged into it.
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
For example, if `Closes #4, #6, Related to #5` is included in a Merge Request
description, issues `#4` and `#6`will close automatically when the MR is merged, but not `#5`.
description, issues `#4` and `#6`are closed automatically when the MR is merged, but not `#5`.
Using `Related to` flags `#5` as a [related issue](related_issues.md),
Using `Related to` flags `#5` as a [related issue](related_issues.md),
but it will not close automatically.
but is not closed automatically.
![merge request closing issue when merged](img/merge_request_closes_issue.png)
![merge request closing issue when merged](img/merge_request_closes_issue.png)
...
@@ -219,9 +215,12 @@ If the issue is in a different repository than the MR, add the full URL for the
...
@@ -219,9 +215,12 @@ If the issue is in a different repository than the MR, add the full URL for the
Closes #4, #6, and https://gitlab.com/<username>/<projectname>/issues/<xxx>
Closes #4, #6, and https://gitlab.com/<username>/<projectname>/issues/<xxx>
```
```
For performance reasons, automatic issue closing is disabled for the very first
push from an existing repository.
#### Default closing pattern
#### Default closing pattern
When not specified, the default issue closing pattern as shown below will be used:
When not specified, this default issue closing pattern is used: