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

fix(questionnaire): directors can update questionnaires with invalid information #601

Closed
wants to merge 10 commits into from

Conversation

JeremyRudman
Copy link
Contributor

@JeremyRudman JeremyRudman commented Feb 11, 2021

added a option to disable validation for when directors submit questionnaires
image

directors can now update questionnaires with missing country or
agreements fields. This is done a temp fix for bh7 but should be removed
later
@JeremyRudman JeremyRudman linked an issue Feb 11, 2021 that may be closed by this pull request
app/controllers/manage/questionnaires_controller.rb Outdated Show resolved Hide resolved
config/app.yml Outdated Show resolved Hide resolved
@JeremyRudman JeremyRudman changed the title fix(questionnaire): directors can update invalid questionnaires fix(questionnaire): directors can update questionnaires with invalid information Feb 14, 2021
Copy link
Contributor

@peterkos peterkos left a comment

Choose a reason for hiding this comment

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

Comments for now; going to do an end to end test of this l8r tonight

app/assets/javascripts/manage/lib/forms.js Outdated Show resolved Hide resolved
app/assets/javascripts/manage/lib/forms.js Outdated Show resolved Hide resolved
= u.input :last_name, label: "Last Name"
= f.input :email, input_html: { value: @questionnaire.user.try(:email) }, required: true, hint: 'Can be an existing user (without a questionnaire) or a new user. If this is a new user, they will receive a randomly-generated password that they must request a password reset for.'
= f.input :phone
= f.input :date_of_birth, start_year: Date.today.year - 18, end_year: Date.today.year - 90, order: [:month, :day, :year]
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the - 18 and - 90 logic? Checking for minor?
We should refactor this logic for validation in 3.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that set the start year and the end year in the drop down to 1931 and 2003. I assume that is meant as basic minor checking but it is set as -5 for the user facing application so I will set it to that here as well

@JeremyRudman JeremyRudman marked this pull request as draft February 15, 2021 05:12
@JeremyRudman
Copy link
Contributor Author

Niche feature with potential downsides downsides so this is being sidelined

@peterkos
Copy link
Contributor

Closing in favor of 3.0 work; written down in Notion to go back to!

@peterkos peterkos closed this Jun 22, 2021
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.

allow directors to edit questionnaires with missing fields
4 participants