This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 29f0c5f8b fix: save the epic type issues as well as the normal issues
(#4786)
29f0c5f8b is described below
commit 29f0c5f8baa2c0e8d2efbcf261aa36adb2b8c46a
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Mar 28 19:48:30 2023 +0800
fix: save the epic type issues as well as the normal issues (#4786)
---
backend/plugins/jira/tasks/epic_extractor.go | 2 +-
backend/plugins/jira/tasks/issue_extractor.go | 16 +++++++---------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/backend/plugins/jira/tasks/epic_extractor.go
b/backend/plugins/jira/tasks/epic_extractor.go
index c895fa9e9..8c3c8eab3 100644
--- a/backend/plugins/jira/tasks/epic_extractor.go
+++ b/backend/plugins/jira/tasks/epic_extractor.go
@@ -54,7 +54,7 @@ func ExtractEpics(taskCtx plugin.SubTaskContext) errors.Error
{
Table: RAW_EPIC_TABLE,
},
Extract: func(row *api.RawData) ([]interface{}, errors.Error) {
- return extractIssues(data, mappings, true, row)
+ return extractIssues(data, mappings, row)
},
})
if err != nil {
diff --git a/backend/plugins/jira/tasks/issue_extractor.go
b/backend/plugins/jira/tasks/issue_extractor.go
index 363960121..0267f1019 100644
--- a/backend/plugins/jira/tasks/issue_extractor.go
+++ b/backend/plugins/jira/tasks/issue_extractor.go
@@ -75,7 +75,7 @@ func ExtractIssues(taskCtx plugin.SubTaskContext)
errors.Error {
Table: RAW_ISSUE_TABLE,
},
Extract: func(row *api.RawData) ([]interface{}, errors.Error) {
- return extractIssues(data, mappings, false, row)
+ return extractIssues(data, mappings, row)
},
})
if err != nil {
@@ -84,7 +84,7 @@ func ExtractIssues(taskCtx plugin.SubTaskContext)
errors.Error {
return extractor.Execute()
}
-func extractIssues(data *JiraTaskData, mappings *typeMappings, ignoreBoard
bool, row *api.RawData) ([]interface{}, errors.Error) {
+func extractIssues(data *JiraTaskData, mappings *typeMappings, row
*api.RawData) ([]interface{}, errors.Error) {
var apiIssue apiv2models.Issue
err := errors.Convert(json.Unmarshal(row.Data, &apiIssue))
if err != nil {
@@ -156,13 +156,11 @@ func extractIssues(data *JiraTaskData, mappings
*typeMappings, ignoreBoard bool,
results = append(results, user)
}
}
- if !ignoreBoard {
- results = append(results, &models.JiraBoardIssue{
- ConnectionId: data.Options.ConnectionId,
- BoardId: data.Options.BoardId,
- IssueId: issue.IssueId,
- })
- }
+ results = append(results, &models.JiraBoardIssue{
+ ConnectionId: data.Options.ConnectionId,
+ BoardId: data.Options.BoardId,
+ IssueId: issue.IssueId,
+ })
labels := apiIssue.Fields.Labels
for _, v := range labels {
issueLabel := &models.JiraIssueLabel{