You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/08/05 02:44:24 UTC

[GitHub] [incubator-devlake] jinzhu2002 opened a new pull request, #2587: fix bug #2550

jinzhu2002 opened a new pull request, #2587:
URL: https://github.com/apache/incubator-devlake/pull/2587

   ### ⚠️ &nbsp;&nbsp;Pre Checklist
   
   > Please complete _ALL_ items in this checklist, and remove before submitting
   
   - [ ] I have read through the [Contributing](https://devlake.apache.org/community/) Documentation & [PR Template](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
   - [ ] This PR is using a `label` (bug, feature etc.)
   - [ ] My code is has necessary documentation (if appropriate)
   - [ ] I have added any relevant tests
   - [ ] This section (**⚠️ &nbsp;&nbsp;Pre Checklist**) will be removed when submitting PR
   
   # Summary
   
   <!--
   Thanks for submitting a pull request!
   
   We appreciate you spending the time to work on these changes.
   Please fill out as many sections below as possible.
   -->
   
   ### 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] jinzhu2002 closed pull request #2587: fix bug #2550

Posted by GitBox <gi...@apache.org>.
jinzhu2002 closed pull request #2587: fix bug #2550
URL: https://github.com/apache/incubator-devlake/pull/2587


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] mindlesscloud merged pull request #2587: fix bug #2550

Posted by GitBox <gi...@apache.org>.
mindlesscloud merged PR #2587:
URL: https://github.com/apache/incubator-devlake/pull/2587


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] jinzhu2002 commented on a diff in pull request #2587: fix bug #2550

Posted by GitBox <gi...@apache.org>.
jinzhu2002 commented on code in PR #2587:
URL: https://github.com/apache/incubator-devlake/pull/2587#discussion_r930491940


##########
plugins/jira/tasks/apiv2models/user.go:
##########
@@ -46,6 +46,10 @@ func (u *Account) getAccountId() string {
 	if u.AccountId != "" {
 		return u.AccountId
 	}
+	//TODO add this code,run success,no test for jira cloud

Review Comment:
   Verify that the cloud version is OK



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] keon94 commented on a diff in pull request #2587: fix bug #2550

Posted by GitBox <gi...@apache.org>.
keon94 commented on code in PR #2587:
URL: https://github.com/apache/incubator-devlake/pull/2587#discussion_r929250953


##########
plugins/jira/tasks/apiv2models/user.go:
##########
@@ -46,6 +46,10 @@ func (u *Account) getAccountId() string {
 	if u.AccountId != "" {
 		return u.AccountId
 	}
+	//TODO add this code,run success,no test for jira cloud

Review Comment:
   why is this TODO?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] jinzhu2002 commented on a diff in pull request #2587: fix bug #2550

Posted by GitBox <gi...@apache.org>.
jinzhu2002 commented on code in PR #2587:
URL: https://github.com/apache/incubator-devlake/pull/2587#discussion_r936157636


##########
plugins/jira/tasks/apiv2models/user.go:
##########
@@ -46,6 +46,10 @@ func (u *Account) getAccountId() string {
 	if u.AccountId != "" {
 		return u.AccountId
 	}
+	//TODO add this code,run success,no test for jira cloud
+	if u.Name != "" {
+		return u.Name

Review Comment:
   OK , I'll try to modify CollectUsers
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] mindlesscloud commented on a diff in pull request #2587: fix bug #2550

Posted by GitBox <gi...@apache.org>.
mindlesscloud commented on code in PR #2587:
URL: https://github.com/apache/incubator-devlake/pull/2587#discussion_r940165551


##########
plugins/jira/tasks/apiv2models/user.go:
##########
@@ -46,6 +46,10 @@ func (u *Account) getAccountId() string {
 	if u.AccountId != "" {
 		return u.AccountId
 	}
+	//TODO add this code,run success,no test for jira cloud
+	if u.Name != "" {
+		return u.Name

Review 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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] mindlesscloud commented on a diff in pull request #2587: fix bug #2550

Posted by GitBox <gi...@apache.org>.
mindlesscloud commented on code in PR #2587:
URL: https://github.com/apache/incubator-devlake/pull/2587#discussion_r930987622


##########
plugins/jira/tasks/apiv2models/user.go:
##########
@@ -46,6 +46,10 @@ func (u *Account) getAccountId() string {
 	if u.AccountId != "" {
 		return u.AccountId
 	}
+	//TODO add this code,run success,no test for jira cloud
+	if u.Name != "" {
+		return u.Name

Review 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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org