diff --git a/backend/plugins/jira/e2e/snapshot_tables/issue_assignees.csv b/backend/plugins/jira/e2e/snapshot_tables/issue_assignees.csv index 44a39c887e8..1917c3a7317 100644 --- a/backend/plugins/jira/e2e/snapshot_tables/issue_assignees.csv +++ b/backend/plugins/jira/e2e/snapshot_tables/issue_assignees.csv @@ -1,31 +1,31 @@ issue_id,assignee_id,assignee_name -jira:JiraIssue:2:10063,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10064,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10065,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10066,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10067,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10068,jira:JiraAccount:2:5ecfbd0c2490cf0c09e2e598, -jira:JiraIssue:2:10070,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8, -jira:JiraIssue:2:10071,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8, -jira:JiraIssue:2:10072,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8, -jira:JiraIssue:2:10076,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87, -jira:JiraIssue:2:10077,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87, -jira:JiraIssue:2:10078,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87, -jira:JiraIssue:2:10079,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87, -jira:JiraIssue:2:10081,jira:JiraAccount:2:5ecfbd0aaa47a00c1997ea8e, -jira:JiraIssue:2:10082,jira:JiraAccount:2:5ecfbd0984083c0c12e5af8f, -jira:JiraIssue:2:10085,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87, -jira:JiraIssue:2:10086,jira:JiraAccount:2:5ecfbd0aaa47a00c1997ea8e, -jira:JiraIssue:2:10087,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10088,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87, -jira:JiraIssue:2:10089,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8, -jira:JiraIssue:2:10090,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10091,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10092,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87, -jira:JiraIssue:2:10093,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8, -jira:JiraIssue:2:10094,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10095,jira:JiraAccount:2:5ecfbd0984083c0c12e5af8f, -jira:JiraIssue:2:10096,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, -jira:JiraIssue:2:10097,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87, -jira:JiraIssue:2:10098,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8, -jira:JiraIssue:2:10099,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf, +jira:JiraIssue:2:10063,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10064,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10065,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10066,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10067,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10068,jira:JiraAccount:2:5ecfbd0c2490cf0c09e2e598,Gerile Tu +jira:JiraIssue:2:10070,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8,yanghui +jira:JiraIssue:2:10071,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8,yanghui +jira:JiraIssue:2:10072,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8,yanghui +jira:JiraIssue:2:10076,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87,yuxiang +jira:JiraIssue:2:10077,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87,yuxiang +jira:JiraIssue:2:10078,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87,yuxiang +jira:JiraIssue:2:10079,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87,yuxiang +jira:JiraIssue:2:10081,jira:JiraAccount:2:5ecfbd0aaa47a00c1997ea8e,chao.cheng +jira:JiraIssue:2:10082,jira:JiraAccount:2:5ecfbd0984083c0c12e5af8f,lin.hao +jira:JiraIssue:2:10085,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87,yuxiang +jira:JiraIssue:2:10086,jira:JiraAccount:2:5ecfbd0aaa47a00c1997ea8e,chao.cheng +jira:JiraIssue:2:10087,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10088,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87,yuxiang +jira:JiraIssue:2:10089,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8,yanghui +jira:JiraIssue:2:10090,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10091,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10092,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87,yuxiang +jira:JiraIssue:2:10093,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8,yanghui +jira:JiraIssue:2:10094,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10095,jira:JiraAccount:2:5ecfbd0984083c0c12e5af8f,lin.hao +jira:JiraIssue:2:10096,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang +jira:JiraIssue:2:10097,jira:JiraAccount:2:5ecfbd0a47d31e0c2a15fd87,yuxiang +jira:JiraIssue:2:10098,jira:JiraAccount:2:5ecfbd0ba04d9c0c220c18d8,yanghui +jira:JiraIssue:2:10099,jira:JiraAccount:2:5ecfbd0c730ec90c1999cadf,Dingding Zhang diff --git a/backend/plugins/jira/tasks/issue_convertor.go b/backend/plugins/jira/tasks/issue_convertor.go index d7da08e876e..87b46a5bb50 100644 --- a/backend/plugins/jira/tasks/issue_convertor.go +++ b/backend/plugins/jira/tasks/issue_convertor.go @@ -85,6 +85,7 @@ func ConvertIssues(subtaskCtx plugin.SubTaskContext) errors.Error { return db.Cursor(clauses...) }, Convert: func(jiraIssue *models.JiraIssue) ([]interface{}, errors.Error) { + var result []interface{} issue := &ticket.Issue{ DomainEntity: domainlayer.DomainEntity{ Id: issueIdGen.Generate(jiraIssue.ConnectionId, jiraIssue.IssueId), @@ -116,16 +117,6 @@ func ConvertIssues(subtaskCtx plugin.SubTaskContext) errors.Error { if jiraIssue.CreatorDisplayName != "" { issue.CreatorName = jiraIssue.CreatorDisplayName } - var result []interface{} - if jiraIssue.AssigneeAccountId != "" { - issue.AssigneeId = accountIdGen.Generate(data.Options.ConnectionId, jiraIssue.AssigneeAccountId) - issueAssignee := &ticket.IssueAssignee{ - IssueId: issue.Id, - AssigneeId: issue.AssigneeId, - AssigneeName: issue.AssigneeName, - } - result = append(result, issueAssignee) - } if jiraIssue.AssigneeDisplayName != "" { issue.AssigneeName = jiraIssue.AssigneeDisplayName } @@ -136,6 +127,15 @@ func ConvertIssues(subtaskCtx plugin.SubTaskContext) errors.Error { issue.Type = ticket.SUBTASK } result = append(result, issue) + if jiraIssue.AssigneeAccountId != "" { + issue.AssigneeId = accountIdGen.Generate(data.Options.ConnectionId, jiraIssue.AssigneeAccountId) + issueAssignee := &ticket.IssueAssignee{ + IssueId: issue.Id, + AssigneeId: issue.AssigneeId, + AssigneeName: issue.AssigneeName, + } + result = append(result, issueAssignee) + } boardIssue := &ticket.BoardIssue{ BoardId: boardId, IssueId: issue.Id,