Commit 0c921e3e authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs/jira-update-api-docs' into 'master'

Add changes to JIRA api docs

See merge request !7675
parents b8980e89 73677444
...@@ -465,10 +465,10 @@ GET /projects/:id/services/jira ...@@ -465,10 +465,10 @@ GET /projects/:id/services/jira
Set JIRA service for a project. Set JIRA service for a project.
>**Note:** >**Notes:**
Setting `project_url`, `issues_url` and `new_issue_url` will allow a user to - Starting with GitLab 8.14, `api_url`, `issues_url`, `new_issue_url` and
easily navigate to the JIRA issue tracker. See the [integration doc][jira-doc] `project_url` are replaced by `project_key`, `url`. If you are using an
for details. older version, [follow this documentation][old-jira-api].
``` ```
PUT /projects/:id/services/jira PUT /projects/:id/services/jira
...@@ -477,11 +477,8 @@ PUT /projects/:id/services/jira ...@@ -477,11 +477,8 @@ PUT /projects/:id/services/jira
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `active` | boolean| no | Enable/disable the JIRA service. | | `active` | boolean| no | Enable/disable the JIRA service. |
| `project_url` | string | yes | The URL to the JIRA project which is being linked to this GitLab project. It is of the form: `https://<jira_host_url>/issues/?jql=project=<jira_project>`. | | `url` | string | yes | The URL to the JIRA project which is being linked to this GitLab project, e.g., `https://jira.example.com`. |
| `issues_url` | string | yes | The URL to the JIRA project issues overview for the project that is linked to this GitLab project. It is of the form: `https://<jira_host_url>/browse/:id`. Leave `:id` as-is, it gets replaced by GitLab at runtime.| | `project_key` | string | yes | The short identifier for your JIRA project, all uppercase, e.g., `PROJ`. |
| `new_issue_url` | string | yes | This is the URL to create a new issue in JIRA for the project linked to this GitLab project, and it is of the form: `https://<jira_host_url>/secure/CreateIssue.jspa` |
| `api_url` | string | yes | The base URL of the JIRA API. It may be omitted, in which case GitLab will automatically use API version `2` based on the `project url`. It is of the form: `https://<jira_host_url>/rest/api/2`. |
| `description` | string | no | A name for the issue tracker. |
| `username` | string | no | The username of the user created to be used with GitLab/JIRA. | | `username` | string | no | The username of the user created to be used with GitLab/JIRA. |
| `password` | string | no | The password of the user created to be used with GitLab/JIRA. | | `password` | string | no | The password of the user created to be used with GitLab/JIRA. |
| `jira_issue_transition_id` | string | no | The ID of a transition that moves issues to a closed state. You can find this number under the JIRA workflow administration (**Administration > Issues > Workflows**) by selecting **View** under **Operations** of the desired workflow of your project. The ID of each state can be found inside the parenthesis of each transition name under the **Transitions (id)** column ([see screenshot][trans]). By default, this ID is set to `2`. | | `jira_issue_transition_id` | string | no | The ID of a transition that moves issues to a closed state. You can find this number under the JIRA workflow administration (**Administration > Issues > Workflows**) by selecting **View** under **Operations** of the desired workflow of your project. The ID of each state can be found inside the parenthesis of each transition name under the **Transitions (id)** column ([see screenshot][trans]). By default, this ID is set to `2`. |
...@@ -670,3 +667,4 @@ GET /projects/:id/services/teamcity ...@@ -670,3 +667,4 @@ GET /projects/:id/services/teamcity
``` ```
[jira-doc]: ../project_services/jira.md [jira-doc]: ../project_services/jira.md
[old-jira-api]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-13-stable/doc/api/services.md#jira
...@@ -97,7 +97,7 @@ in the table below. ...@@ -97,7 +97,7 @@ in the table below.
| Field | Description | | Field | Description |
| ----- | ----------- | | ----- | ----------- |
| `URL` | The base URL to the JIRA project which is being linked to this GitLab project. E.g., `https://jira.example.com`. | | `URL` | The base URL to the JIRA project which is being linked to this GitLab project. E.g., `https://jira.example.com`. |
| `Project key` | The short, the identifier for your JIRA project, all uppercase. | | `Project key` | The short identifier for your JIRA project, all uppercase, e.g., `PROJ`. |
| `Username` | The user name created in [configuring JIRA step](#configuring-jira). | | `Username` | The user name created in [configuring JIRA step](#configuring-jira). |
| `Password` |The password of the user created in [configuring JIRA step](#configuring-jira). | | `Password` |The password of the user created in [configuring JIRA step](#configuring-jira). |
| `JIRA issue transition` | This is the ID of a transition that moves issues to a closed state. You can find this number under JIRA workflow administration ([see screenshot](img/jira_workflow_screenshot.png)). | | `JIRA issue transition` | This is the ID of a transition that moves issues to a closed state. You can find this number under JIRA workflow administration ([see screenshot](img/jira_workflow_screenshot.png)). |
...@@ -121,7 +121,7 @@ ID in GitLab commits and merge requests. ...@@ -121,7 +121,7 @@ ID in GitLab commits and merge requests.
When GitLab project has JIRA issue tracker configured and enabled, mentioning When GitLab project has JIRA issue tracker configured and enabled, mentioning
JIRA issue in GitLab will automatically add a comment in JIRA issue with the JIRA issue in GitLab will automatically add a comment in JIRA issue with the
link back to GitLab. This means that in comments in merge requests and commits link back to GitLab. This means that in comments in merge requests and commits
referencing an issue, eg. `PROJECT-7`, will add a comment in JIRA issue in the referencing an issue, e.g., `PROJECT-7`, will add a comment in JIRA issue in the
format: format:
``` ```
...@@ -150,11 +150,11 @@ the transition ID was set up correctly). ...@@ -150,11 +150,11 @@ the transition ID was set up correctly).
There are currently three trigger words, and you can use either one to achieve There are currently three trigger words, and you can use either one to achieve
the same goal: the same goal:
- `Resolves GITLAB-1` - `Resolves PROJECT-1`
- `Closes GITLAB-1` - `Closes PROJECT-1`
- `Fixes GITLAB-1` - `Fixes PROJECT-1`
- where `GITLAB-1` the issue ID of the JIRA project. where `PROJECT-1` is the issue ID of the JIRA project.
### JIRA issue closing example ### JIRA issue closing example
......
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