Skip to content

Commit

Permalink
Add incident related tables (#768)
Browse files Browse the repository at this point in the history
* Add incident related tables

* Fix compile errors
  • Loading branch information
d4x1 authored Jun 21, 2024
1 parent 65290ea commit 3cb94f1
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/DataModels/DevLakeDomainLayerSchema.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,45 @@ metrics such as _'ratio of unplanned issues'_, _'completion rate of sprint issue
| `board_id` | varchar | 255 | Board id | FK_boards.id |
| `sprint_id` | varchar | 255 | Sprint id | FK_sprints.id |

#### incidents

An `incidents` is the abstraction of data sources' incidents.

| **field** | **type** | **length** | **description** | **key** |
|:----------------------------|:----------------------------------------------|:-----------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|
| `id` | varchar | 255 | An incident's `id` is composed of < plugin >:< Entity >:< PK0 >[:PK1]..." <ul><li>For Github incident, a Github incident's id is like "github:GithubIssues:< GithubIssueId >". E.g. 'github:GithubIssues:1049355647'</li> <li>For Jira incident, it is like "jira:JiraIssues:< JiraSourceId >:< JiraIssueId >". E.g. 'jira:JiraIssues:1:10063'. < JiraSourceId > is used to identify which jira source the incident came from, since DevLake users can import data from several different Jira instances at the same time.</li></ul> | PK |
| `incident_key` | varchar | 255 | The key of this incident. | |
| `url` | varchar | 255 | The url of the incident. It's a web address in most cases. | |
| `title` | varchar | 255 | The title of an incident | |
| `description` | longtext | | The detailed description/summary of an issue | |
| `status` | varchar | 100 | The standard statuses of this incident. There are 3 standard statuses: <ul><li> TODO: this incident is in backlog or to-do list</li><li>IN_PROGRESS: this incident is in progress</li><li>DONE: incident issue is resolved or closed</li></ul>The 3 standard statuses are transformed from the original statuses of an incident. The transformation rule: <ul><li>For Jira issue status: transformed from the Jira issue's `statusCategory`. Jira issue has 3 default status categories: 'To Do', 'In Progress', 'Done'.</li><li>For Github issue status: <ul><li>open -> TODO</li><li>closed -> DONE</li></ul></li></ul> | |
| `original_status` | varchar | 100 | The original status of an incident. | |
| `priority` | varchar | 255 | The priority of the incident | |
| `urgency` | varchar | 255 | The urgency of the incident | |
| `component` | varchar | 255 | The component a bug-incident affects. This field only supports Github plugin for now. The value is transformed from Github issue labels by the rules set according to the user's configuration of .env by end users during DevLake installation. | |
| `severity` | varchar | 255 | The severity level of a bug-incident. This field only supports Github plugin for now. The value is transformed from Github issue labels by the rules set according to the user's configuration of .env by end users during DevLake installation. | |
| `parent_incident_id` | varchar | 255 | The id of its parent incident | |
| `original_estimate_minutes` | int | | The original estimation of the time allocated for this incident | |
| `time_spent_minutes` | int | | The original estimation of the time allocated for this incident | |
| `time_remaining_minutes` | int | | The remaining time to resolve the incident | |
| `creator_id` | varchar | 255 | The id of incident creator | |
| `creator_name` | varchar | 255 | The name of the creator | |
| `created_date` | datetime | 3 | The time incident created | |
| `updated_date` | datetime | 3 | The last time incident gets updated | |
| `resolution_date` | datetime | 3 | The time the incident changes to 'DONE'. | |
| `lead_time_minutes` | int | | Describes the cycle time from incident creation to incident resolution. The unit is minute. | |
| `original_project` | varchar | 255 | The name of the original project this incident belongs to. Transformed from a Jira project's name, a TAPD workspace's name, etc. | |

#### incident_assignees

This table shows the assignee(s) of incidents. Multiple entries can exist per incident, some data sources may have multiple assignees at the same time. This table can be used to get the detailed information of all incidents' assignees.

| **field** | **type** | **length** | **description** | **key** |
|:----------------|:---------|:-----------|:----------------|:----------------|
| `incident_id` | varchar | 255 | Incident ID | FK_incidents.id |
| `assignee_id` | varchar | 255 | Assignee ID | FK_accounts.id |
| `assignee_name` | varchar | 255 | Assignee Name | |

<br/>

### Domain 2 - Source Code Management
Expand Down

0 comments on commit 3cb94f1

Please sign in to comment.