Skip to content

fix: add sub jurisdictions to allow multiple jurisdictions in search#6323

Open
ludtkemorgan wants to merge 5 commits into
mainfrom
5985/sub-jurisdictions
Open

fix: add sub jurisdictions to allow multiple jurisdictions in search#6323
ludtkemorgan wants to merge 5 commits into
mainfrom
5985/sub-jurisdictions

Conversation

@ludtkemorgan
Copy link
Copy Markdown
Collaborator

@ludtkemorgan ludtkemorgan commented May 18, 2026

This PR addresses #5985

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

Description

With a region based search we need to be able fetch listings from multiple jurisdictions tied to the higher level jurisdiction.

This PR adds a new field to the jurisdiction table called sub_jurisdictions that has the ids of all jurisdictions tied to that jurisdiction. For example in Doorway the "Bay Area" jurisdiction would have sub jurisdictions of all of the individual counties in the bay area.

Additionally, I noticed we were both returning more data than needed in the get jurisdictions endpoint as well as calling this endpoint in more places than we should have. This PR does the following:

  • switches the call to use a select of just the fields we need rather than an include
  • All of the calls within the partner site are now getting the jurisdiction data from the user's profile instead of making an additional call to the backend

How Can This Be Tested/Reviewed?

This can be tested with the new "Bay Bridge" and sub jurisdictions

  1. in the api directory run yarn setup:region
  2. Set the jurisdiction to Bay Bridge in the public .env file and start up the site
  3. On the public site you should see listing from all jurisdictions
  4. turn off the enableListingMap feature flag and restart the public site. In the list view you should also see listings from all jurisdictions

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
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for partners-bloom-msq2 ready!

Name Link
🔨 Latest commit c61b527
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-msq2/deploys/6a0b78aaeb2cea0008198c38
😎 Deploy Preview https://deploy-preview-6323--partners-bloom-msq2.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
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for bloom-angelopolis ready!

Name Link
🔨 Latest commit 4a79c72
🔍 Latest deploy log https://app.netlify.com/projects/bloom-angelopolis/deploys/6a17072ab472800007ba678a
😎 Deploy Preview https://deploy-preview-6323--bloom-angelopolis.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
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit 4a79c72
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-dev/deploys/6a17072ab657ab00086bef61
😎 Deploy Preview https://deploy-preview-6323--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.

@ludtkemorgan ludtkemorgan force-pushed the 5985/sub-jurisdictions branch from c61b527 to 1576b22 Compare May 18, 2026 21:15
@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for bloom-public-seeds ready!

Name Link
🔨 Latest commit 4a79c72
🔍 Latest deploy log https://app.netlify.com/projects/bloom-public-seeds/deploys/6a17072a9d03fd000825221a
😎 Deploy Preview https://deploy-preview-6323--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
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit 4a79c72
🔍 Latest deploy log https://app.netlify.com/projects/bloom-exygy-dev/deploys/6a17072ab657ab00086bef5c
😎 Deploy Preview https://deploy-preview-6323--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.

@ludtkemorgan ludtkemorgan marked this pull request as ready for review May 19, 2026 19:22
@ludtkemorgan ludtkemorgan added the 1 review needed Requires 1 more review before ready to merge label May 19, 2026
@mcgarrye mcgarrye self-requested a review May 26, 2026 18:29
@mcgarrye
Copy link
Copy Markdown
Collaborator

The seed is for Bridge Bay not Bay Bridge, had me thinking I couldn't read based on your testing instructions lol

Copy link
Copy Markdown
Collaborator

@mcgarrye mcgarrye left a comment

Choose a reason for hiding this comment

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

Looks good, no major issues. Few callouts

  1. Home page of public site does not display the correct jurisdiction name
  2. If the sub jurisdictions have the enableListingMap set to true, but the top level jurisdiction does not, we follow the top level. This makes sense but we should document
  3. We don't need to account for non-seeds going forward, correct?

Comment thread api/src/dtos/jurisdictions/jurisdiction.dto.ts Outdated
Comment thread api/src/services/jurisdiction.service.ts
@mcgarrye mcgarrye added ready to merge Should be applied when a PR has been reviewed and approved and removed 1 review needed Requires 1 more review before ready to merge labels May 27, 2026
@ludtkemorgan ludtkemorgan force-pushed the 5985/sub-jurisdictions branch from b4e1e10 to 4a79c72 Compare May 27, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Should be applied when a PR has been reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants