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

Allow using deleted team name #6211

Closed
1 task
jankeromnes opened this issue Oct 14, 2021 · 6 comments · Fixed by #6273
Closed
1 task

Allow using deleted team name #6211

jankeromnes opened this issue Oct 14, 2021 · 6 comments · Fixed by #6273
Assignees
Labels
feature: teams and projects [DEPRECATED] Please, use feature: organizations or feature: projects labels instead. team: webapp Issue belongs to the WebApp team type: improvement Improves an existing feature or existing code user experience

Comments

@jankeromnes
Copy link
Contributor

jankeromnes commented Oct 14, 2021

Currently, in the context of the new Teams & Projects UI, there are two problems related to the deletion of a Team:

  • When you delete a Team, it is not possible to create a new Team that has the same slug as the deleted Team (e.g. a Team with the same name)

To fix this, the TeamsDB should ignore all teams that have markedDeleted: true when looking at existing teams / existing team slugs / etc (the same way as it currently ignores all teams that have deleted: true):

const existingTeam = await teamRepo.findOne({ slug, deleted: false });
if (!!existingTeam) {
throw new Error('A team with this name already exists');
}

Note: This also applies to all locations in TeamsDB where deleted: false is required.


- [ ] When you are the last person to leave a Team, the team ends up having 0 members (hence no longer being accessible to anyone) Issue exists in #4623

In this case (when the last person leaves), the Team should also get markedDeleted:

membership.deleted = true;
await membershipRepo.save(membership);

@jankeromnes jankeromnes added user experience type: improvement Improves an existing feature or existing code feature: teams and projects [DEPRECATED] Please, use feature: organizations or feature: projects labels instead. labels Oct 14, 2021
@jankeromnes jankeromnes added the team: webapp Issue belongs to the WebApp team label Oct 14, 2021
@gtsiolis
Copy link
Contributor

Thanks for opening this @jankeromnes!

For the first point, see #5066 (comment). Cc @laushinka @svenefftinge

For the second point, see #4623.

@JanKoehnlein
Copy link
Contributor

/schedule

@roboquat
Copy link
Contributor

@JanKoehnlein: Issue scheduled in the meta team (WIP: 0)

In response to this:

/schedule

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@laushinka
Copy link
Contributor

@jankeromnes Thanks for this issue! Yes, the first point makes sense. Re the second point, it seems that there are more solution options as @gtsiolis linked. Should it be tackled in that issue instead (and have it updated in case of staleness)?

@laushinka
Copy link
Contributor

/assign

@laushinka laushinka changed the title Improve Team deletion UX Allow using deleted team name Oct 18, 2021
@jldec
Copy link
Contributor

jldec commented Oct 18, 2021

@laushinka I have scheduled #4623 since there was already some work done there on the last-member deletion UX.

cc: @gtsiolis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: teams and projects [DEPRECATED] Please, use feature: organizations or feature: projects labels instead. team: webapp Issue belongs to the WebApp team type: improvement Improves an existing feature or existing code user experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants