You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devlake.apache.org by "rogeriospinaintelipost (via GitHub)" <gi...@apache.org> on 2023/10/17 18:49:15 UTC

[I] [Bug][Teams] Cant link a user to multiple teams [incubator-devlake]

rogeriospinaintelipost opened a new issue, #6264:
URL: https://github.com/apache/incubator-devlake/issues/6264

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   When I create a team user linked to multiple teams, their DORA deployments appears for every team he belongs.
   
   ### What do you expect to happen
   
   I expect to see DORA metrics by team, and devlake to understand for which team that deployment is.
   
   ### How to reproduce
   
   - Create Team A and Team B, and Project X
   - Create a user and link it to both teams (A,B)
   - Send webhook deployment for Project X
   - See DORA (by Team), both teams will show the same deployment in "Monthly deployments" panel
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   v0.18.0
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: dev-unsubscribe@devlake.apache.org.apache.org

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


Re: [I] [Bug][Teams] Cant link a user to multiple teams [incubator-devlake]

Posted by "rogeriospinaintelipost (via GitHub)" <gi...@apache.org>.
rogeriospinaintelipost closed issue #6264: [Bug][Teams] Cant link a user to multiple teams 
URL: https://github.com/apache/incubator-devlake/issues/6264


-- 
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: dev-unsubscribe@devlake.apache.org

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


Re: [I] [Bug][Teams] Cant link a user to multiple teams [incubator-devlake]

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #6264:
URL: https://github.com/apache/incubator-devlake/issues/6264#issuecomment-1767782421

   @Startrekzky please take a look at the problem, thanks.


-- 
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: dev-unsubscribe@devlake.apache.org

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


Re: [I] [Bug][Teams] Cant link a user to multiple teams [incubator-devlake]

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky commented on issue #6264:
URL: https://github.com/apache/incubator-devlake/issues/6264#issuecomment-1772638745

   Hi @rogeriospinaintelipost , thanks for the clarification. May I ask:
   
   1. Why User B belongs to multiple teams? What's his role in real life? Or, the teams you're referring to is something like 'project teams'?
   2. When measuring Team A and Team B's DORA metrics, should User B's commits be calculated in both teams?


-- 
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: dev-unsubscribe@devlake.apache.org

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


Re: [I] [Bug][Teams] Cant link a user to multiple teams [incubator-devlake]

Posted by "rogeriospinaintelipost (via GitHub)" <gi...@apache.org>.
rogeriospinaintelipost commented on issue #6264:
URL: https://github.com/apache/incubator-devlake/issues/6264#issuecomment-1769148949

   @Startrekzky, it also leads to another problem. When a user switches to another team, their authored deployments go with them. I expected that those deployments would remain tied to the team


-- 
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: dev-unsubscribe@devlake.apache.org

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


Re: [I] [Bug][Teams] Cant link a user to multiple teams [incubator-devlake]

Posted by "rogeriospinaintelipost (via GitHub)" <gi...@apache.org>.
rogeriospinaintelipost commented on issue #6264:
URL: https://github.com/apache/incubator-devlake/issues/6264#issuecomment-1768657899

   @Startrekzky 
   This is my project's sctructure and I dont have any problem with that, works great!
   ![Untitled - Frame 1](https://github.com/apache/incubator-devlake/assets/108951098/84daaec7-2b79-48d6-a5bb-c39d0adae0d2)
   
   This is my structure for Teams, note that user B works in both teams. Their authored deployment commits counts for both teams. I did not find any link between project/scopes and teams/users. Ex: A deploy fired to Scope B repo, should belong to Project B, and it works, but how to link that with only one team if the author are linked in multiple teams?
   ![Untitled - Frame 2](https://github.com/apache/incubator-devlake/assets/108951098/4979c930-0d47-4884-a001-ff8886264664)
   
   On Dashboard query I noticed that there is a join with project_mapping, but it is not enough to find the right team.
   ````
   SELECT
   	cdc.cicd_deployment_id,
   	max(cdc.finished_date) as deployment_finished_date
   FROM cicd_deployment_commits cdc
   JOIN commits c on cdc.commit_sha = c.sha
   	join user_accounts ua on c.author_id = ua.account_id
   	join users u on ua.user_id = u.id
   	join team_users tu on u.id = tu.user_id
   	join teams t on tu.team_id = t.id
   JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'
   WHERE
   	t.name in ($team)
   	and cdc.result = 'SUCCESS'
   	and cdc.environment = 'PRODUCTION'
   GROUP BY 1
   HAVING $__timeFilter(max(cdc.finished_date))
   ````
   


-- 
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: dev-unsubscribe@devlake.apache.org

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


Re: [I] [Bug][Teams] Cant link a user to multiple teams [incubator-devlake]

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky commented on issue #6264:
URL: https://github.com/apache/incubator-devlake/issues/6264#issuecomment-1767862675

   Can you tell us how you organize your projects and teams in your organization, and how each project/team manages repos/issues/deployments? Please refer to the use cases in this doc https://devlake.apache.org/docs/GettingStarted/HowToOrganizeDevlakeProjects#4-use-cases


-- 
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: dev-unsubscribe@devlake.apache.org

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