[GYR1-925] Zip code routing site-level fix#6202
Open
spompea-cfa wants to merge 4 commits intomainfrom
Open
Conversation
|
Heroku app: https://gyr-review-app-6202-c2301ffb5dc4.herokuapp.com/ |
embarnard
reviewed
Feb 26, 2026
Contributor
embarnard
left a comment
There was a problem hiding this comment.
Looks good but I think we should remove the rerouting if they've already been routed per this conversation
| if current_intake.client.routing_method.blank? || current_intake.client.routing_method_at_capacity? | ||
| PartnerRoutingService.update_intake_partner(current_intake) | ||
| end | ||
| PartnerRoutingService.update_intake_partner(current_intake) |
Contributor
There was a problem hiding this comment.
we should avoid updating their vita partners if they have already been assigned: https://cfastaff.slack.com/archives/C067F665KB2/p1772129935714389
| end | ||
|
|
||
| context "when client zip corresponds to a Site but not the Site's parent Org" do | ||
| # That is, the Site and its parent Org have no zips in common (GYR1-930). |
Contributor
There was a problem hiding this comment.
(GYR1-930) is the AI tracking feature?
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.
Link to Jira issue
Is PM acceptance required?
What was done?
I first set up the examples provided in the ticket and reproduced locally. My
take is basically this: the intersection of a site's zip codes and its parent
org's zip codes might be the null set, and there needs to be adequate logic to
appropriately do zip-code-based routing directly to a site in such a case. I subequenlty made
the necessary changs to make that happen.
In addition, while this wasn't strictly within the scope of this ticket, I
changed the logic in InterviewSchedulingController#after_update_sucess to always
rerun the routing after a submit/update. Rationale: because a user can navigate
forward and back through the flow, they might change the zip and/or language,
necessitating a reroute.
How to test?
A thorough test would probably involve setting up the test cases as described in
the ticket -- i.e., setting up the org and site entries and then creating the intakes
via the flow. (It takes less time than it might seem.)