Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨(teams) add Team dependencies #560

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

✨(teams) add Team dependencies #560

wants to merge 4 commits into from

Conversation

qbey
Copy link
Collaborator

@qbey qbey commented Nov 26, 2024

Purpose

We want to allow Teams to be structured in trees to represent actual teams in a company.

Proposal

Add the "tree" to the Team model and update the API endpoints to list parent teams along with the "direct" teams the user has access to.

This first implementation only allows to manually create those team trees.
The API returns flat teams because we did not define the frontend behavior yet, this will be done later when we really know what we want.

The Treebeard has been pimped for PSQL use, and make the different values explicit.

  • add django-treebeard dependency
  • turn the Team model into an MP node
  • update APIs to list parent teams if the user belongs to the same organization only

@qbey qbey force-pushed the qbey/teams-add-tree branch from 34da950 to 312bb54 Compare November 27, 2024 09:38
@qbey qbey force-pushed the qbey/teams-add-tree branch from 312bb54 to 0d2b578 Compare December 5, 2024 14:24
@qbey qbey self-assigned this Dec 6, 2024
@qbey qbey force-pushed the qbey/teams-add-tree branch 7 times, most recently from ed99015 to 9ad2678 Compare December 18, 2024 10:43
@qbey qbey added the backend label Dec 18, 2024
@qbey qbey changed the title 🚧(teams) add Team dependencies ✨(teams) add Team dependencies Dec 18, 2024
@qbey qbey force-pushed the qbey/teams-add-tree branch from 9ad2678 to 94ab00e Compare December 18, 2024 10:49
@qbey qbey marked this pull request as ready for review December 18, 2024 10:49
@qbey qbey requested review from sampaccoud and sdemagny December 18, 2024 10:49
@qbey qbey force-pushed the qbey/teams-add-tree branch 3 times, most recently from 500ec8f to 7e6037b Compare December 18, 2024 17:34
@qbey qbey force-pushed the qbey/teams-add-tree branch 4 times, most recently from e7202a1 to 9b32890 Compare January 6, 2025 13:05
@qbey qbey force-pushed the qbey/teams-add-tree branch 4 times, most recently from a2c8fc1 to a2e7d74 Compare January 8, 2025 13:26
This provides the technical way to create Team trees.
The implementation is quite naive.
qbey added 3 commits January 8, 2025 14:28
Also return the parent teams in the user's team endpoints.

This is a first implementation which returns a flat list
of teams (not a tree). This is not really helpful, but
it allows to create hierarchical teams manually (via
admin) if an organization needs it.
Also return the parent teams in the user's team endpoints.
This will allow the frontend to represent teams as a
tree if needed.
@qbey qbey force-pushed the qbey/teams-add-tree branch from a2e7d74 to dc848dd Compare January 8, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants