You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2022/09/02 05:26:44 UTC

[incubator-devlake] 02/03: fix(jira): use issuetype.name if issuetype has no untranslatedName

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

warren pushed a commit to branch release-v0.12
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 18c406b7214cccb64d8f582681d437b64f770a58
Author: Yingchu Chen <yi...@merico.dev>
AuthorDate: Thu Sep 1 21:49:24 2022 +0800

    fix(jira): use issuetype.name if issuetype has no untranslatedName
    
    closes #2920
---
 plugins/jira/tasks/issue_extractor.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/plugins/jira/tasks/issue_extractor.go b/plugins/jira/tasks/issue_extractor.go
index 19097a88..ffb732c0 100644
--- a/plugins/jira/tasks/issue_extractor.go
+++ b/plugins/jira/tasks/issue_extractor.go
@@ -59,7 +59,11 @@ func ExtractIssues(taskCtx core.SubTaskContext) error {
 		return err
 	}
 	for _, issueType := range issueTypes {
-		typeIdMapping[issueType.Id] = issueType.UntranslatedName
+		if issueType.UntranslatedName == "" {
+			typeIdMapping[issueType.Id] = issueType.Name
+		} else {
+			typeIdMapping[issueType.Id] = issueType.UntranslatedName
+		}
 	}
 
 	stdTypeMappings := make(map[string]string)