This is an automated email from the ASF dual-hosted git repository.

zky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 3cb94f1d12d Add incident related tables (#768)
3cb94f1d12d is described below

commit 3cb94f1d12dc882e757552769df727ba921ac607
Author: Lynwee <[email protected]>
AuthorDate: Fri Jun 21 19:15:30 2024 +0800

    Add incident related tables (#768)
    
    * Add incident related tables
    
    * Fix compile errors
---
 docs/DataModels/DevLakeDomainLayerSchema.md | 39 +++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/docs/DataModels/DevLakeDomainLayerSchema.md 
b/docs/DataModels/DevLakeDomainLayerSchema.md
index 8ec803d7b18..1b64084bd09 100644
--- a/docs/DataModels/DevLakeDomainLayerSchema.md
+++ b/docs/DataModels/DevLakeDomainLayerSchema.md
@@ -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**                                                  
                                                                                
                                                                                
                                                                                
                                                                                
               [...]
+|:----------------------------|:----------------------------------------------|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 [...]
+| `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 inci [...]
+| `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 J [...]
+| `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

Reply via email to