Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store current school on the journey session #2793

Merged
merged 6 commits into from
Jun 10, 2024
Merged

Conversation

felixclack
Copy link
Contributor

We want to add the current_school selection to the journey session answers.

The code that calculates the slug sequence can reference this new location safely.

When it comes to the eligibility checks, the coupling to the claim requires changes
that expand the scope beyond what is reasonable for this work.

For now, we will still store the current school on the claim object as well as the session.
This ensures that the eligibility checks continue to work. A follow on PR will handle
removing this update when the eligibility check has been decoupled from the claim.

Copy link

github-actions bot commented Jun 5, 2024

@felixclack felixclack force-pushed the current-school-journey branch 7 times, most recently from 9c8304b to e3b8ca5 Compare June 6, 2024 06:26
The base Form class handles assigning params to defined attributes and
so this line in the initialize method is redundant.
We're moving all the answers to the journey session, so this change
ensures we save the current_school_id here too.
@felixclack felixclack force-pushed the current-school-journey branch 2 times, most recently from 14ecd5e to f8cd8d7 Compare June 6, 2024 06:28
The journey session holds a reference to the current school and this can
be used when calculating the slug and page sequence.
@felixclack felixclack force-pushed the current-school-journey branch from f8cd8d7 to 62c2510 Compare June 6, 2024 06:29
@@ -236,9 +236,10 @@ def induction_question_required?
end

def ecp_school_selected?
return false unless claim.eligibility.current_school
school = answers&.current_school || claim.eligibility.current_school
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if we can use the shim to do this, it would handle the ORing of this? /cc @rjlynch - would that make sense?

@felixclack felixclack merged commit e43a4df into master Jun 10, 2024
15 checks passed
@felixclack felixclack deleted the current-school-journey branch June 10, 2024 07:58
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.

3 participants