Skip to content

fix: Resolves issue preventing new MyMLH users from creating questionnaires #516

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

Merged
merged 4 commits into from
Jan 6, 2021

Conversation

cbaudouinjr
Copy link
Member

@cbaudouinjr cbaudouinjr commented Jan 6, 2021

Checks to see if any of the required MyMLH data is null. If true, we display an error that instructs the user to continue manually.

image

fixes #515

Edit flow:

After you auth via MyMLH, it will attempt to skip the first page, whether the info exists or not, triggering the frontend validation.
If no info is missing, it will skip to page 2 of the questionnaire form.

If info is missing, due to the triggered validation, it will attempt to pull as many fields as possible, and highlight the missing field(s):

@cbaudouinjr cbaudouinjr requested a review from peterkos January 6, 2021 03:42
@cbaudouinjr cbaudouinjr self-assigned this Jan 6, 2021
@cbaudouinjr cbaudouinjr linked an issue Jan 6, 2021 that may be closed by this pull request
cbaudouinjr and others added 2 commits January 5, 2021 23:39
frontend validation is triggered via page skip, whether successful (will skip) or not (no skip)
@@ -29,17 +30,23 @@ def new
if session["devise.provider_data"] && session["devise.provider_data"]["info"]
info = session["devise.provider_data"]["info"]
@skip_my_mlh_fields = true
if !all_my_mlh_fields_provided?
Copy link
Contributor

Choose a reason for hiding this comment

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

Style/NegatedIf: Favor unless over if for negative conditions.

@peterkos peterkos merged commit f7e2a9d into 2.1.4 Jan 6, 2021
@peterkos peterkos deleted the hm-515 branch January 6, 2021 06:03
cbaudouinjr added a commit that referenced this pull request Jan 6, 2021
* fix: Resolves issue preventing new MyMLH users from creating questionnaires (#516)

* fix: Resolves issue preventing new MyMLH users from creating questionnaires

* refactor: Cleans code

* Attempt to pull any # of params from MyMLH

frontend validation is triggered via page skip, whether successful (will skip) or not (no skip)

* Cange error msg, pet hound

Co-authored-by: Peter Kos <[email protected]>

* vcs url error now displayed in edit application page (#518)

changed from redirect_to to render "edit" on error. redirect_to makes
a fresh request which causes the error information to be lost

Co-authored-by: Chris Baudouin, Jr <[email protected]>
Co-authored-by: JeremyRudman <[email protected]>
peterkos added a commit that referenced this pull request Jan 8, 2021
* fix(questionnaire): missing information now in correct place (#443)

* fix(questionnair): missing information now in correct place

it now displays the correct message "Please read & accept" instead of
missing information and the notification is now in the correct place

* Update app/assets/javascripts/validate.js

* Revert "Update app/assets/javascripts/validate.js"

This reverts commit bc54783.

Signed-off-by: Peter Kos <[email protected]>

Co-authored-by: Peter Kos <[email protected]>

* fix: Fixes mobile agreements layout bug

Signed-off-by: Peter Kos <[email protected]>

* feat: Removes semantic-release (#446)

* refactor: Moves CI to develop branch (#449)

Co-authored-by: Peter Kos <[email protected]>

* build: Merges 2.1.2 into develop

* fix(hakiri): corrected unescaped model attribute

* fix(hakiri): added html_safe to show proper output

Co-authored-by: Jeremy Rudman <[email protected]>
Co-authored-by: JeremyRudman <[email protected]>

* fix: Shows questionnaires_closed_message on registration

* feat: Allows agreements to be fully customizable (#465)

* feat: Allows agreements to be fully customizable

* fix: Fixes broken migrations

* fix: Migrations misname issue

* feat: Forces agreement links to open in new tab

* Agreement validation detection fixed

Signed-off-by: Peter Kos <[email protected]>

* refactor: Removes old input hint

Co-authored-by: Peter Kos <[email protected]>

* fix(hakiri): fixed un-escaped regex for vcs link (#467)

* fix(hakiri): corrected unescaped model attribute

* fix(hakiri): added html_safe to show proper output

* fix(hakiri): added \A \z to regex

* fix(questionnaire): fixed hakiri error with vcs link regex

* fix(questionnaire): fixed houndci commplaint

Co-authored-by: Chris Baudouin, Jr <[email protected]>

* fix(hakiri): fix hakiri error with user input in html_safe (#475)

Co-authored-by: Peter Kos <[email protected]>

* fix: Uninstalls deprecated chromedriver (#484)

* fix: VCS regex matches all valid usernames for each provider; URLs are now case-insensitive, dokku check extended (#485)

* fixed vcs regex to allow upper case

added a extra test to vcs links to test upper case links. also made it
so portfolio links ands vcs links are stored in lower case

* fixed houndci complaints

* lossened username regex and add another test

* made regex more pleasing to read

* made regex method more readable

* checks now does 300 attempts

* 2.1.4 <- develop (#519)

* fix: Resolves issue preventing new MyMLH users from creating questionnaires (#516)

* fix: Resolves issue preventing new MyMLH users from creating questionnaires

* refactor: Cleans code

* Attempt to pull any # of params from MyMLH

frontend validation is triggered via page skip, whether successful (will skip) or not (no skip)

* Cange error msg, pet hound

Co-authored-by: Peter Kos <[email protected]>

* vcs url error now displayed in edit application page (#518)

changed from redirect_to to render "edit" on error. redirect_to makes
a fresh request which causes the error information to be lost

Co-authored-by: Chris Baudouin, Jr <[email protected]>
Co-authored-by: JeremyRudman <[email protected]>

Co-authored-by: JeremyRudman <[email protected]>
Co-authored-by: Chris Baudouin, Jr <[email protected]>
Co-authored-by: Jeremy Rudman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add null check for required MyMLH data
3 participants