bugs are found during testing
In order to fully use this plugin, you will need to set various configurations via Dev Lake's config-ui
service. Open config-ui
on browser, by default the URL is http://localhost:4000, then go to Data Integrations / JIRA page. JIRA plugin currently supports multiple data sources, Here you can add new connection to your JIRA connection or update the settings if needed.
For each connection, you will need to set up following items:
https://<mydomain>.atlassian.net/rest
. devlake officially supports JIRA Cloud Service on atlassian.net, may or may not work for JIRA Server Instance.config-ui
click the KEY icon on the right side of the input to generate a full HTTP BASIC AUTH
token for you.custom field
, which is vary from instance to instance. Please see Find Out Custom Fields.https://id.atlassian.com/manage-profile/security/api-tokens
Devlake supports 3 standard types, all metrics are computed based on these types:
Bug
: Problems found during test
phase, before they can reach the production environment.Incident
: Problems went through test
phash, got deployed into production environment.Requirement
: Normally, it would be Story
on your instance if you adopted SCRUM.You can may map arbitrary YOUR OWN ISSUE TYPE to a single STANDARD ISSUE TYPE, normally, one would map Story
to Requirement
, but you could map both Story
and Task
to Requirement
if that was your case. Those unspecified type would be copied as standard type directly for your convenience, so you don't need to map your Bug
to standard Bug
.
Type mapping is critical for some metrics, like Requirement Count, make sure to map your custom type correctly.
Please follow this guide: How to find Jira the custom field ID in Jira? ยท merico-dev/lake Wiki
In order to collect data from JIRA, you have to compose a JSON looks like following one, and send it via Triggers
page on config-ui
:
[ [ { "plugin": "jira", "options": { "sourceId": 1, "boardId": 8, "since": "2006-01-02T15:04:05Z" } } ] ]
sourceId
: The ID
field from JIRA Integration page.boardId
: JIRA board id, see Find Board Id for detail.since
: optional, download data since specified date/time only.?rapidView=
Example:
https://<your_jira_endpoint>/secure/RapidBoard.jspa?rapidView=51
Your board id is used in all REST requests to DevLake. You do not need to configure this at the data source level.
GET /plugins/jira/sources [ { "ID": 14, "CreatedAt": "2021-10-11T11:49:19.029Z", "UpdatedAt": "2021-10-11T11:49:19.029Z", "name": "test-jira-source", "endpoint": "https://merico.atlassian.net/rest", "basicAuthEncoded": "basicAuth", "epicKeyField": "epicKeyField", "storyPointField": "storyPointField", "StoryPointCoefficient": 0.5 } ]
POST /plugins/jira/sources { "name": "jira data source name", "endpoint": "jira api endpoint, i.e. https://merico.atlassian.net/rest", "basicAuthEncoded": "generated by `echo -n <jira login email>:<jira token> | base64`", "epicKeyField": "name of customfield of epic key", "storyPointField": "name of customfield of story point", "storyPointCoefficient": 1, // help converting user storypoint to stand storypoint "typeMappings": { // optional, send empty object to delete all typeMappings of the data source "userType": { "standardType": "devlake standard type" } } }
PUT /plugins/jira/sources/:sourceId { "name": "jira data source name", "endpoint": "jira api endpoint, i.e. https://merico.atlassian.net/rest", "basicAuthEncoded": "generated by `echo -n <jira login email>:<jira token> | base64`", "epicKeyField": "name of customfield of epic key", "storyPointField": "name of customfield of story point", "storyPointCoefficient": 1, // help converting user storypoint to stand storypoint "typeMappings": { // optional, send empty object to delete all typeMappings of the data source "userType": { "standardType": "devlake standard type", } } }
GET /plugins/jira/sources/:sourceId { "name": "jira data source name", "endpoint": "jira api endpoint, i.e. https://merico.atlassian.net/rest", "basicAuthEncoded": "generated by `echo -n <jira login email>:<jira token> | base64`", "epicKeyField": "name of customfield of epic key", "storyPointField": "name of customfield of story point", "storyPointCoefficient": 1, // help converting user storypoint to stand storypoint "typeMappings": { // optional, send empty object to delete all typeMappings of the data source "userType": { "standardType": "devlake standard type", } } }
DELETE /plugins/jira/sources/:sourceId
GET /plugins/jira/sources/:sourceId/type-mappings [ { "jiraSourceId": 16, "userType": "userType", "standardType": "standardType" } ]
POST /plugins/jira/sources/:sourceId/type-mappings { "userType": "userType", "standardType": "standardType" }
PUT /plugins/jira/sources/:sourceId/type-mapping/:userType { "standardType": "standardTypeUpdated" }
DELETE /plugins/jira/sources/:sourceId/type-mapping/:userType
GET /plugins/jira/sources/:sourceId/proxy/rest/*path For example: Requests to http://your_devlake_host/plugins/jira/sources/1/proxy/rest/agile/1.0/board/8/sprint would forward to https://your_jira_host/rest/agile/1.0/board/8/sprint { "maxResults": 1, "startAt": 0, "isLast": false, "values": [ { "id": 7, "self": "https://merico.atlassian.net/rest/agile/1.0/sprint/7", "state": "closed", "name": "EE Sprint 7", "startDate": "2020-06-12T00:38:51.882Z", "endDate": "2020-06-26T00:38:00.000Z", "completeDate": "2020-06-22T05:59:58.980Z", "originBoardId": 8, "goal": "" } ] }