diff options
| author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-13 16:38:24 +0200 |
|---|---|---|
| committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-13 16:38:24 +0200 |
| commit | ed3f267497a1348f7e50e396e1d3569f2da8d48b (patch) | |
| tree | 4f2ce69ffec0447ed3bea34e73241ddfa24d2f40 /doc/api/issues.md | |
| parent | f5d24e60f842096f670593fb4dd0d29c3f5d4fcc (diff) | |
| parent | 9e68109f2d454dd05cf42a03a41a2e858e1e11bc (diff) | |
| download | gitlab-ce-ed3f267497a1348f7e50e396e1d3569f2da8d48b.tar.gz | |
Merge branch 'ci-commit-as-pipeline' into with-pipeline-view
* ci-commit-as-pipeline: (131 commits)
Optimise Merge Request builds rendering
Fix migrations on MySQL
Update db/schema.rb
Cleanup changes
Cleanup required migrations
Add indexes concurrently on PostgreSQL
Fix CiStatus implementation and tests
Fix group_member_spec to not leak information
Fix doc for moving an issue
Update tests for moving issues via API
Tie example config to JIRA screenshot
API: Ability to move an issue
Added ability to add custom tags to transactions
API: Avoid group leak while updating the group
API: Return 404 if user does not have access to group
Move 'New branch from issue' feature doc to web_editor.md
Fix repository cache invalidation issue when project is recreated with an empty repo
improve formatting
Add `Gitlab.com?` method
(doc) fix typo to ssh keys doc url
...
Conflicts:
app/controllers/projects/pipelines_controller.rb
app/helpers/ci_status_helper.rb
app/helpers/gitlab_routing_helper.rb
app/views/projects/ci/commits/_commit.html.haml
app/views/projects/commit/_ci_commit.html.haml
Diffstat (limited to 'doc/api/issues.md')
| -rw-r--r-- | doc/api/issues.md | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/doc/api/issues.md b/doc/api/issues.md index 1c635a6cdcf..f09847aef95 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -351,6 +351,61 @@ DELETE /projects/:id/issues/:issue_id curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85 ``` +## Move an issue + +Moves an issue to a different project. If the operation is successful, a status +code `201` together with moved issue is returned. If the project, issue, or +target project is not found, error `404` is returned. If the target project +equals the source project or the user has insufficient permissions to move an +issue, error `400` together with an explaining error message is returned. + +``` +POST /projects/:id/issues/:issue_id/move +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer | yes | The ID of a project | +| `issue_id` | integer | yes | The ID of a project's issue | +| `to_project_id` | integer | yes | The ID of the new project | + +```bash +curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85/move +``` + +Example response: + +```json +{ + "id": 92, + "iid": 11, + "project_id": 5, + "title": "Sit voluptas tempora quisquam aut doloribus et.", + "description": "Repellat voluptas quibusdam voluptatem exercitationem.", + "state": "opened", + "created_at": "2016-04-05T21:41:45.652Z", + "updated_at": "2016-04-07T12:20:17.596Z", + "labels": [], + "milestone": null, + "assignee": { + "name": "Miss Monserrate Beier", + "username": "axel.block", + "id": 12, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/46f6f7dc858ada7be1853f7fb96e81da?s=80&d=identicon", + "web_url": "https://gitlab.example.com/u/axel.block" + }, + "author": { + "name": "Kris Steuber", + "username": "solon.cremin", + "id": 10, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/7a190fecbaa68212a4b68aeb6e3acd10?s=80&d=identicon", + "web_url": "https://gitlab.example.com/u/solon.cremin" + } +} +``` + ## Comments on issues Comments are done via the [notes](notes.md) resource. |
