Skip to main content
Version: v0.13

Jira

Summary

This plugin collects Jira data through Jira Cloud REST API. It then computes and visualizes various engineering metrics from the Jira data.

jira metric display

Project Metrics This Covers

Metric NameDescription
Requirement CountNumber of issues with type "Requirement"
Requirement Lead TimeLead time of issues with type "Requirement"
Requirement Delivery RateRatio of delivered requirements to all requirements
Requirement GranularityNumber of story points associated with an issue
Bug CountNumber of issues with type "Bug"
bugs are found during testing
Bug AgeLead time of issues with type "Bug"
both new and deleted lines count
Bugs Count per 1k Lines of CodeAmount of bugs per 1000 lines of code
Incident CountNumber of issues with type "Incident"
incidents are found when running in production
Incident AgeLead time of issues with type "Incident"
Incident Count per 1k Lines of CodeAmount of incidents per 1000 lines of code

Configuration

Configuring Jira via config-ui.

Collect Data From JIRA

To collect data, select Advanced Mode on the Create Pipeline Run page and paste a JSON config like the following:

Warning: Data collection only supports single-task execution, and the results of concurrent multi-task execution may not meet expectations.
[
[
{
"plugin": "jira",
"options": {
"connectionId": 1,
"boardId": 8,
"since": "2006-01-02T15:04:05Z"
}
}
]
]
  • 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.

API

Data Connections

  1. Get all data connection
[
{
"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"
}
]
  1. Create a new data connection
{
"name": "jira data connection 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",
"typeMappings": { // optional, send empty object to delete all typeMappings of the data connection
"userType": {
"standardType": "devlake standard type"
}
}
}
  1. Update data connection
{
"name": "jira data connection 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",
"typeMappings": { // optional, send empty object to delete all typeMappings of the data connection
"userType": {
"standardType": "devlake standard type",
}
}
}
  1. Get data connection detail
{
"name": "jira data connection 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",
"typeMappings": { // optional, send empty object to delete all typeMappings of the data connection
"userType": {
"standardType": "devlake standard type",
}
}
}
  1. Delete data connection

Type mappings

  1. Get all type mappings
[
{
"jiraConnectionId": 16,
"userType": "userType",
"standardType": "standardType"
}
]
  1. Create a new type mapping
{
"userType": "userType",
"standardType": "standardType"
}
  1. Update type mapping
{
"standardType": "standardTypeUpdated"
}
  1. Delete type mapping

  1. API forwarding For example: Requests to http://your_devlake_host/plugins/jira/connections/1/proxy/rest/agile/1.0/board/8/sprint would be forwarded 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": ""
}
]
}