mindlesscloud commented on code in PR #355: URL: https://github.com/apache/incubator-devlake-website/pull/355#discussion_r1062456284
########## docs/Plugins/jira.md: ########## @@ -7,129 +7,122 @@ description: > ## Summary -This plugin collects Jira data through Jira Cloud REST API. It then computes and visualizes various engineering metrics from the Jira data. +This plugin collects Jira data through Jira REST API. It then computes and visualizes various engineering metrics from the Jira data. -<img width="2035" alt="jira metric display" src="https://user-images.githubusercontent.com/2908155/132926143-7a31d37f-22e1-487d-92a3-cf62e402e5a8.png" /> +## Entities -## Project Metrics This Covers +Check out the [Jira entities](/Overview/SupportedDataSources.md#data-collection-scope-by-each-plugin) collected by this plugin. -| Metric Name | Description | -|:------------------------------------|:--------------------------------------------------------------------------------------------------| -| Requirement Count | Number of issues with type "Requirement" | -| Requirement Lead Time | Lead time of issues with type "Requirement" | -| Requirement Delivery Rate | Ratio of delivered requirements to all requirements | -| Requirement Granularity | Number of story points associated with an issue | -| Bug Count | Number of issues with type "Bug"<br/><i>bugs are found during testing</i> | -| Bug Age | Lead time of issues with type "Bug"<br/><i>both new and deleted lines count</i> | -| Bugs Count per 1k Lines of Code | Amount of bugs per 1000 lines of code | -| Incident Count | Number of issues with type "Incident"<br/><i>incidents are found when running in production</i> | -| Incident Age | Lead time of issues with type "Incident" | -| Incident Count per 1k Lines of Code | Amount of incidents per 1000 lines of code | +## Data Refresh Policy -## Configuration -Configuring Jira via [config-ui](/UserManuals/ConfigUI/Jira.md). - -## Collect Data From JIRA - -To collect data, select `Advanced Mode` on the `Create Pipeline Run` page and paste a JSON config like the following: - -> <font color="#ED6A45">Warning: Data collection only supports single-task execution, and the results of concurrent multi-task execution may not meet expectations.</font> +Check out the [data refresh policy](/Overview/SupportedDataSources.md#jira) of this plugin. -``` -[ - [ - { - "plugin": "jira", - "options": { - "connectionId": 1, - "boardId": 8, - "since": "2006-01-02T15:04:05Z" - } - } - ] -] -``` +## Metrics -- `connectionId`: The `ID` field from **JIRA Integration** page. -- `boardId`: JIRA board id, see "Find Board Id" for details. -- `since`: optional, download data since a specified date only. +Metrics that can be calculated based on the data collected from Jira: +- [Requirement Count](/Metrics/RequirementCount.md) +- [Requirement Lead Time](/Metrics/RequirementLeadTime.md) +- [Requirement Delivery Rate](/Metrics/RequirementDeliveryRate.md) +- [Requirement Granularity](/Metrics/RequirementGranularity.md) +- [Bug Count](/Metrics/BuildCount.md) +- [Bug Age](/Metrics/BugAge.md) +- [Bugs Count per 1k Lines of Code](/Metrics/BugCountPer1kLinesOfCode.md) +- [Incident Age](/Metrics/IncidentAge.md) +- [Incident Count per 1k Lines of Code](/Metrics/IncidentCountPer1kLinesOfCode.md) -## API -### Data Connections +## Configuration +Configuring Jira via [config-ui](/UserManuals/ConfigUI/Jira.md). -1. Get all data connection +## API Sample Request + +### Create a new data connection + +```shell +curl -X 'POST' \ + 'http://127.0.0.1:8080/plugins/jira/connections' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "name": "jira test", + "endpoint": "https://merico.atlassian.net/rest/", + "proxy": "http://127.0.1.1:1080", + "username": "your user name", + "password": "your password" +}' +``` -```GET /plugins/jira/connections -[ - { - "ID": 14, - "CreatedAt": "2021-10-11T11:49:19.029Z", - "UpdatedAt": "2021-10-11T11:49:19.029Z", - "name": "test-jira-connection", - "endpoint": "https://merico.atlassian.net/rest", - "basicAuthEncoded": "basicAuth", - "epicKeyField": "epicKeyField", - "storyPointField": "storyPointField" +### Create a new transformation rule + +```shell +curl -X 'POST' \ + 'http://127.0.0.1:8080/plugins/jira/transformation_rules' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "epicKeyField": "", + "storyPointField": "", + "remotelinkCommitShaPattern": "", + "typeMappings": { + "10040": { + "standardType": "Incident", + "statusMappings": null + } } -] +}' ``` -2. Create a new data connection +### Create a new scope Review Comment: you are right, I will remove them -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
