fix bug #2550#2587
Conversation
| if u.AccountId != "" { | ||
| return u.AccountId | ||
| } | ||
| //TODO add this code,run success,no test for jira cloud |
There was a problem hiding this comment.
Verify that the cloud version is OK
| } | ||
| //TODO add this code,run success,no test for jira cloud | ||
| if u.Name != "" { | ||
| return u.Name |
There was a problem hiding this comment.
The accountId is a primary key of table _tool_jira_accounts, it should be unique. How about we leave it alone and modify the Collector CollectAccounts. For the server version Jira, the endpoint api/2/user/search should be invoked instead of api/2/user which only accepts a username, not an email. Please be cautious about the response of the API api/2/user/search, which is an array, not an object. So the ResponseParser should also be adjusted accordingly.
There was a problem hiding this comment.
OK , I'll try to modify CollectUsers
There was a problem hiding this comment.
There is one difference between the response of the two endpoints. For api/2/user, it is an object, however, the response of api/2/user/search is an array. The collector's ResponseParser should be modified to handle both cases. The collector returns a slice of interface []interface{}, and every item of the slice is a user object. There is no need to change the extractor for it always receives a single user object.
label(bug, feature etc.)Summary
Does this close any open issues?
Please mention the issues here.
Screenshots
Include any relevant screenshots here.
Other Information
Any other information that is important to this PR.