Yu Yan - Take over PR #1748 - fix: Removed userId of deleted users from task->resources and teams->members#2149
Open
yany960 wants to merge 4 commits intodevelopmentfrom
Open
Conversation
Rajasrivatsansrinivasan
requested changes
Apr 11, 2026
Rajasrivatsansrinivasan
left a comment
There was a problem hiding this comment.
Reviewed PR #2149 by Yu Yan. Tested the delete user flow after assigning a test user to both team members and task resources. While the user deletion request succeeds, the deleted user is not fully removed from all referenced collections as expected. This needs further investigation before merge.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
This PR takes over from PR #1748 (originally by Ujjwal, then Yu Yan).
Users that were deleted were not removed from Projects that they were assigned to. This PR ensures that when a user is deleted, they are also removed from Task->Resources (Which is responsible for Projects) and Teams->Members.
Related PRS (if any):
Main changes explained:
userProfileController.js'sdeleteUserProfilefunction to remove the deleted userIds from other collections (tasks and teams)How to test:
npm run buildandnpm startto run this PR locallytasksandteamscollectionshttp://localhost:4500/api/userProfile/{userId_to_delete}with the body:{ "userId": {userId_to_delete}, "option": "delete", "requestor": { "requestorId": {admin_userId} } }