Skip to content

Combine two versions of confirm_document_capture_complete before action#8123

Merged
soniaconnolly merged 5 commits intomainfrom
sonia-lg-9335
Apr 4, 2023
Merged

Combine two versions of confirm_document_capture_complete before action#8123
soniaconnolly merged 5 commits intomainfrom
sonia-lg-9335

Conversation

@soniaconnolly
Copy link
Contributor

@soniaconnolly soniaconnolly commented Apr 3, 2023

🛠 Summary of changes

This started as part of LG-9335, but there are complications with using idv_session in the FSM steps, so that needs to wait until the FSM extraction is complete. Meanwhile, combine the versions of confirm_document_capture_complete in IdvStepConcern (used by SsnController) and in AddressController. This will make it easier to continue updating that method as we continue adding functionality to DocumentCaptureController.

Notes:

  • Added method pii_from_doc to IdvStepConcern
  • pii is no longer an instance variable and no longer memoized in SsnController and AddressController
  • The long term plan is to move all the step-related before actions and methods to IdvStepConcern

📜 Testing Plan

  • Create an account
  • Navigate to /verify
  • Before reaching the SSN step, try to skip ahead to /verify/ssn and /verify/address
  • Expect to stay on the current step
  • Continue to VerifyInfo step
  • Edit SSN and address, expect to edit successfully

solipet and others added 3 commits April 3, 2023 14:18
Co-authored-by: Sonia Connolly <sonia.connolly@gsa.gov>
Move flow_session and flow_path to IdvStepConcern

changelog: Internal, Flow State Machine replacement, combine similar before actions
@soniaconnolly soniaconnolly requested review from a team and solipet April 3, 2023 22:39
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

One small comment, but otherwise LGTM 👍

Comment on lines 27 to 28
flow_path = flow_session&.[](:flow_path)

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this line if it's now a method above?

Also, do we need the nil-safe access in the method above? I notice we have it here and in pii_from_doc.

Suggested change
flow_path = flow_session&.[](:flow_path)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks. We do need the nil protection in case someone jumps to the /verify/ssn step without a flow_session - we were seeing 500s in prod, so we added that. I took this line out and added nil protection in #flow_path.

Copy link
Contributor

@solipet solipet left a comment

Choose a reason for hiding this comment

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

lgtm!

@soniaconnolly soniaconnolly merged commit 1398aba into main Apr 4, 2023
@soniaconnolly soniaconnolly deleted the sonia-lg-9335 branch April 4, 2023 19:24
jc-gsa pushed a commit that referenced this pull request Apr 19, 2023
…tion (#8123)

Combine the versions of confirm_document_capture_complete in IdvStepConcern (used by SsnController) and in AddressController. This will make it easier to continue updating that method as we continue adding functionality to DocumentCaptureController.

Added method pii_from_doc to IdvStepConcern
pii is no longer an instance variable and no longer memoized in SsnController and AddressController
The long term plan is to move all the step-related before actions and methods to IdvStepConcern
Move flow_session and flow_path to IdvStepConcern

changelog: Internal, Flow State Machine replacement, combine similar before actions

---------

Co-authored-by: Douglas Price <douglas.price@gsa.gov>
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