Skip to content

Diya fix(projectAssignment): recognizing projectId param#1726

Merged
one-community merged 1 commit into
developmentfrom
Diya_ProjectAssignment_UserProfile_Fix
Sep 13, 2025
Merged

Diya fix(projectAssignment): recognizing projectId param#1726
one-community merged 1 commit into
developmentfrom
Diya_ProjectAssignment_UserProfile_Fix

Conversation

@DiyaWadhwani
Copy link
Copy Markdown
Contributor

Description

Fixes an issue where adding a project from Quick Setup → Assign and Assign Project on the user profile would cause the latest project to be retained and remove the existing assigned project.
Root cause: the backend putUserProfile handler only normalized projects items that had _id/id (or were plain strings). Items sent with projectId were ignored, resulting in record.projects being overwritten with a reduced array.
Change: Update normalization to also accept projectId so mixed payloads (some items with _id, some with projectId) are handled correctly.

Related PRS (if any):

None

Main changes explained:

  • In putUserProfile, update normalizeToIdString to accept projectId in addition to _id/id/string.

How to test:

  1. DevTools verification
  • In the Network tab for the PUT /userProfile/:userId call, confirm the request body includes: projects as an array where items may have _id or projectId.

Screenshots or videos of changes:

Screenshot 2025-09-13 at 1 12 33 AM Screenshot 2025-09-13 at 1 12 05 AM

@one-community one-community merged commit b8218d8 into development Sep 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants