You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(customize): expand CSV import functionality for issues-related tables (#804)
- Add support for importing data into `issue_repo_commits`, `sprints`, `issue_worklogs`, and `issue_changelogs` tables
- Enhance `issues` table import to include `sprint_ids` field and automatic account record creation
- Update documentation to reflect new import capabilities and provide sample CSV formats
Copy file name to clipboardExpand all lines: docs/Plugins/customize.md
+90-7Lines changed: 90 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ description: >
11
11
This plugin provides users the ability to:
12
12
- Add/delete columns in domain layer tables
13
13
- Insert values to certain columns with data extracted from some raw layer tables
14
-
- Import data from CSV files(only `issues`, `issue_commits`, `qa_apis`, `qa_test_cases` and `qa_test_case_executions` tables are supported)
14
+
- Import data from CSV files(only `issues`, `issue_commits`, `issue_repo_commits`, `sprints`, `issue_worklogs`, `issue_changelogs`, `qa_apis`, `qa_test_cases` and `qa_test_case_executions` tables are supported)
15
15
16
16
**NOTE:** The names of columns added via this plugin must start with the prefix `x_`
17
17
@@ -175,20 +175,25 @@ Drop the column `x_text` of the table `issues`
175
175
176
176
> POST /plugins/customize/csvfiles/issues.csv
177
177
178
-
The HTTP `Content-Type` must be `multipart/form-data`, and the form should have three fields:
178
+
The HTTP `Content-Type` must be `multipart/form-data`, and the form should have four fields:
179
179
180
-
-`file`: The CSV file
180
+
-`file`: The CSV file to upload
181
181
-`boardId`: It will be written to the `id` field of the `boards` table, the `board_id` field of `board_issues`, and the `_raw_data_params` field of `issues`
182
182
-`boardName`: It will be written to the `name` field of the `boards` table
183
+
-`incremental`: Whether to import incrementally (default: false)
184
+
185
+
Upload a CSV file and import it to the `issues` table via this API. There should be no extra fields in the file except the `labels` and `sprint_ids` fields, and if the field value is `NULL`, it should be `NULL` in the CSV instead of the empty string.
183
186
184
-
Upload a CSV file and import it to the `issues` table via this API. There should be no extra fields in the file except the `labels` field, and if the field value is `NULL`, it should be `NULL` in the CSV instead of the empty string.
187
+
**Note:**
188
+
- The `sprint_ids` field should contain comma-separated sprint IDs (e.g. "sprint1,sprint2")
189
+
- These values will be automatically written to the `sprint_issues` table during import
185
190
DevLake will parse the CSV file and store it in the `issues` table, where the `labels` are stored in the `issue_labels` table.
186
191
If the `boardId` does not appear, a new record will be created in the boards table. The `board_issues` table will be updated at the same time as the import.
0 commit comments