Skip to content

[Bug][jira plugin] devlake collection jira server information #2550

@jinzhu2002

Description

@jinzhu2002

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

lake-v0110-devlake-1 | time="2022-07-20 01:19:53" level=error msg=" [task #24] [jira] retry #2 for http code error[404]:[{"errorMessages":["用户“aa@bbb.com”不存在"],"errors":{}}]"
lake-v0110-devlake-1 | time="2022-07-20 01:19:54" level=error msg=" [task #24] [jira] retry #2 for http code error[404]:[{"errorMessages":["用户“cc@bbb.com”不存在"],"errors":{}}]"
lake-v0110-devlake-1 | time="2022-07-20 01:19:56" level=error msg=" [task #24] [jira] retry #2 for http code error[404]:[{"errorMessages":["用户“ggg@bbb.com”不存在"],"errors":{}}]"

execute task fail

What you expected to happen

collection jira server information success

How to reproduce

curl http://127.0.0.1:8080/rest/agile/1.0/board/85/issue?expand=changelog&jql=ORDER+BY+created+ASC&maxResults=100&startAt=0

"changelog":{"startAt":0,"maxResults":13,"total":13,"histories":[{"id":"148308","author":{"self":"http://127.0.0.1:8080/rest/api/2/user?username=aaa","name":"aaa","key":"aaa","emailAddress":"aa@bbb.com","avatarUrls":{"48x48":"http://127.0.0.1:8080/secure/useravatar?ownerId=aaa&avatarId=11401","24x24":"http://127.0.0.1:8080/secure/useravatar?size=small&ownerId=aaa&avatarId=11401","16x16":"http://127.0.0.1::8080/secure/useravatar?size=xsmall&ownerId=aaa&avatarId=11401","32x32":"http://127.0.0.1:8080/secure/useravatar?size=medium&ownerId=aaa&avatarId=11401"},"displayName":"sss

no accountID tag

modify apiv2models/user.go

func (u *User) getAccountId() string {
if u == nil {
return ""
}
if u.AccountId != "" {
return u.AccountId
}
//add this code,run success,no test for jira cloud
if (u.AccountId == "") && (u.Name != "") {
return u.Name
}
return u.EmailAddress
}

Anything else

No response

Version

v0.11.0

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions