Skip to content

Conversation

@mcgarrye
Copy link
Collaborator

@mcgarrye mcgarrye commented Dec 17, 2025

This PR addresses #(5147)

  • Addresses the issue in full
  • Addresses only certain aspects of the issue

Description

Refactors the application service create and read functions to work with the new MSQ schemas. Also improves the update function ahead of further refactor.

How Can This Be Tested/Reviewed?

Testing existing functionality:

  • Run yarn setup
  • Start application
  • Apply to a listing on the public site with preferences/programs (all seeded listings should have?)
  • [For part two, open network tab before clicking submit. Copy the payload sent]
  • View submitted application
  • Login to partner site and submit a paper application with preferences/programs
  • View submitted application
  • Edit submitted application

Testing with MSQ V2:

  • Start up prisma studio
  • Login to the partner site as a Super Admin
  • Go to /admin and turn on enableV2MSQ for Bloomington
  • Go to the api page and run /scriptRunner/migrateMultiselectDataToRefactor
  • Adjust the copied payload for submission by populating the applicationSelections field [example body below]
  • Submit through the api using /applications/create
  • Call the GET on the returned id

Example body for the applicationsSelections field. Use prisma studio to collect the ids after running the script

"applicationSelections": [
    {
        "hasOptedOut": null,
        "multiselectQuestion": {"id": "3e4c5476-8767-4bfa-b308-f5a1640ed06e"},
        "selections": [
            {
                "addressHolderAddress": {
                    "placeName": null,
                    "city": "Napa",
                    "county": null,
                    "state": "CA",
                    "street": "2024 1st St",
                    "street2": "",
                    "zipCode": "94559",
                    "latitude": null,
                    "longitude": null
                },
                "addressHolderName": null,
                "addressHolderRelationship": null,
                "isGeocodingVerified": null,
                "multiselectOption": {"id": "82df263e-6d74-4b67-b834-9a67b83afbff"}
            }
        ]
    }
]

Author Checklist:

  • Added QA notes to the issue with applicable URLs
  • Reviewed in a desktop view
  • Reviewed in a mobile view
  • Reviewed considering accessibility
  • Added tests covering the changes
  • Made corresponding changes to the documentation
  • Ran yarn generate:client and/or created a migration when required

Review Process:

  • Read and understand the issue
  • Ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@netlify
Copy link

netlify bot commented Dec 17, 2025

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit b4c0f71
🔍 Latest deploy log https://app.netlify.com/projects/bloom-exygy-dev/deploys/694ad0350f831d0008384893
😎 Deploy Preview https://deploy-preview-5701--bloom-exygy-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.

@netlify
Copy link

netlify bot commented Dec 17, 2025

Deploy Preview for bloom-flagly canceled.

Name Link
🔨 Latest commit a12e534
🔍 Latest deploy log https://app.netlify.com/projects/bloom-flagly/deploys/694affb349290e0007f86982

@netlify
Copy link

netlify bot commented Dec 17, 2025

Deploy Preview for bloom-public-seeds ready!

Name Link
🔨 Latest commit b4c0f71
🔍 Latest deploy log https://app.netlify.com/projects/bloom-public-seeds/deploys/694ad0354e7a9300085b9990
😎 Deploy Preview https://deploy-preview-5701--bloom-public-seeds.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.

@netlify
Copy link

netlify bot commented Dec 17, 2025

Deploy Preview for bloom-angelopolis canceled.

Name Link
🔨 Latest commit a12e534
🔍 Latest deploy log https://app.netlify.com/projects/bloom-angelopolis/deploys/694affb3872ece000873160d

@netlify
Copy link

netlify bot commented Dec 17, 2025

Deploy Preview for bloom-lakeview ready!

Name Link
🔨 Latest commit b4c0f71
🔍 Latest deploy log https://app.netlify.com/projects/bloom-lakeview/deploys/694ad0354f4da7000899c243
😎 Deploy Preview https://deploy-preview-5701--bloom-lakeview.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.

@mcgarrye mcgarrye closed this Dec 17, 2025
@mcgarrye mcgarrye reopened this Dec 17, 2025
@netlify
Copy link

netlify bot commented Dec 17, 2025

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit a12e534
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-dev/deploys/694affb31c62340008ea3a25
😎 Deploy Preview https://deploy-preview-5701--partners-bloom-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.

Copy link
Collaborator

@ludtkemorgan ludtkemorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far no issues found but I'm still testing

});

describe('submit endpoint', () => {
describe('submit endpoint with MSQ V1', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: You can do sub describes. So this could have a top-level describe('submit endpoint and then sub describes for V1 vs V2

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it this way so that when we do clean-up, we can just remove this section without having to move levels

@mcgarrye mcgarrye added 1 review needed Requires 1 more review before ready to merge 2 reviews needed Requires 2 more review before ready to merge and removed 1 review needed Requires 1 more review before ready to merge labels Dec 22, 2025
@mcgarrye mcgarrye mentioned this pull request Dec 23, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 reviews needed Requires 2 more review before ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants