Skip to content

Diya fix(qst): add newly assigned projects to user profile#4067

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

Diya fix(qst): add newly assigned projects to user profile#4067
one-community merged 1 commit into
developmentfrom
Diya_QST_Fix

Conversation

@DiyaWadhwani
Copy link
Copy Markdown
Contributor

@DiyaWadhwani DiyaWadhwani commented Sep 13, 2025

Description

Project assignment via Quick Setup would show the new project in the projects tab and then disappear immediately on success popup.
Root cause: The frontend payload in handleSubmit overwrote the updated projects array with a stale variable, and the Assign modal sometimes sent mixed shapes (_id vs projectId), causing the backend to retain only the last item.

Fixes: (Priority: High) – The project assignment was failing in the Quick Setup flow.

Related PRS (if any):

None

Main changes explained:

  • Update handleSubmit (User Profile page):
    -- Build the payload from the merged updatedUserProfile instead of overriding with a stale projects variable.
    -- Normalize projects to a stable list of string IDs (_id or projectId) before sending to the API to avoid accidental drops.
  • Update AssignSetUpModal:
    -- Use project.projectId (with fallback if needed) when constructing links / payloads so the selected project’s id is consistent with the rest of the UI.

How to test:

  1. Check into current branch
  2. Do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. Login as a user who has access for QST
  5. User Profile > Projects (keep this tab open)
  6. QST > Paste a google doc link > Check the checkbox > Yes
  7. Verify that the project gets updated in the Projects tab

Screenshots or videos of changes:

QST_Fix.mp4

@netlify
Copy link
Copy Markdown

netlify Bot commented Sep 13, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit be739be
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/68c5258af16b30000849317b
😎 Deploy Preview https://deploy-preview-4067--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@DiyaWadhwani DiyaWadhwani added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Sep 13, 2025
@one-community one-community merged commit be1bea1 into development Sep 13, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants