Skip to content

Rename ial2_consent_given (1/3)#9286

Merged
matthinz merged 1 commit intomainfrom
matthinz/idv-consent-given-step-1
Sep 29, 2023
Merged

Rename ial2_consent_given (1/3)#9286
matthinz merged 1 commit intomainfrom
matthinz/idv-consent-given-step-1

Conversation

@matthinz
Copy link
Contributor

While working on LG-11041 I noticed that, while we store the fact that the user checked the consent checkbox in IdvSession as idv_consent_given, we are still using ial2_consent_given for the form fields. I'd like to get the naming consistent to help avoid confusion in the future.

This PR renames some internal variables and allows using either params[:idv_consent_given] or params[ial2_consent_given]. There will be two subsequent PRs required after this one is deployed:

  1. Actually change the ial2_consent_given form field to idv_consent_given
  2. Remove references to ial2_consent_given entirely

Goal is to match form field names to IdvSession properties. There will be 2 more PRs required here:

1. Actually change ial2_consent_given form field to idv_consent_given
2. Remove support for ial2_consent_given

[skip changelog]
@matthinz matthinz requested a review from a team September 28, 2023 23:14
Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

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

Yes please! I've had this on my list for a while. LGTM.

@matthinz matthinz changed the title Begin process of renaming ial2_consent_given field to idv_consent_given Rename ial2_consent_given (1/3) Sep 28, 2023

def submit(params)
@ial2_consent_given = params[:ial2_consent_given] == '1'
@idv_consent_given = params[:idv_consent_given] == '1' || params[:ial2_consent_given] == '1'
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally I'd go for one of these

Suggested change
@idv_consent_given = params[:idv_consent_given] == '1' || params[:ial2_consent_given] == '1'
@idv_consent_given = (params[:idv_consent_given] || params[:ial2_consent_given]) == '1'

@matthinz matthinz merged commit 53efec1 into main Sep 29, 2023
@matthinz matthinz deleted the matthinz/idv-consent-given-step-1 branch September 29, 2023 17:54
matthinz added a commit that referenced this pull request Oct 3, 2023
Follow-on to #9286, removing references to ial2_consent_given from the frontend.

[skip changelog]
matthinz added a commit that referenced this pull request Oct 4, 2023
Follow-on to #9286, removing references to ial2_consent_given from the frontend.

[skip changelog]
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