Skip to content

Commit

Permalink
fix(jira): set issue_assignees' assignee_name correctly (#7761)
Browse files Browse the repository at this point in the history
  • Loading branch information
d4x1 authored and action_bot committed Jul 18, 2024
1 parent 6b624a9 commit 40bba3f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
60 changes: 30 additions & 30 deletions backend/plugins/jira/e2e/snapshot_tables/issue_assignees.csv
Original file line number Diff line number Diff line change
@@ -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
20 changes: 10 additions & 10 deletions backend/plugins/jira/tasks/issue_convertor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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
}
Expand All @@ -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,
Expand Down

0 comments on commit 40bba3f

Please sign in to comment.