Skip to content

[GYR1-925] Zip code routing site-level fix#6202

Open
spompea-cfa wants to merge 4 commits intomainfrom
gyr1-925-zip-code-routing-fix
Open

[GYR1-925] Zip code routing site-level fix#6202
spompea-cfa wants to merge 4 commits intomainfrom
gyr1-925-zip-code-routing-fix

Conversation

@spompea-cfa
Copy link
Contributor

@spompea-cfa spompea-cfa commented Feb 20, 2026

Link to Jira issue

Is PM acceptance required?

  • Yes - don't merge until JIRA issue is accepted!

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.)

@github-actions
Copy link

Heroku app: https://gyr-review-app-6202-c2301ffb5dc4.herokuapp.com/
View logs: heroku logs --app gyr-review-app-6202 (optionally add --tail)

@spompea-cfa spompea-cfa changed the title [draft] [GYR1-925] Zip code routing site level fix [GYR1-925] Zip code routing site level fix Feb 24, 2026
@spompea-cfa spompea-cfa changed the title [GYR1-925] Zip code routing site level fix [GYR1-925] Zip code routing site-level fix Feb 25, 2026
@spompea-cfa spompea-cfa marked this pull request as ready for review February 25, 2026 21:00
Copy link
Contributor

@embarnard embarnard 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 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)
Copy link
Contributor

Choose a reason for hiding this comment

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

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).
Copy link
Contributor

Choose a reason for hiding this comment

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

(GYR1-930) is the AI tracking feature?

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