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

All boolean attributes should be "yes" or "no" #218

Merged
merged 5 commits into from
Jul 26, 2018
Merged

Conversation

irisfaraway
Copy link
Member

https://eaflood.atlassian.net/browse/WC-419

If there are questions where there is a yes or no answer, like smart answers or "Do you have any declared convictions?" we've been saving the answer as a boolean value.

However, the old system saves them as a string - "yes" or "no".

So we have to update the renewals engine to save and validate these answers as strings instead (at least until we can fix our technical debt).

https://eaflood.atlassian.net/browse/WC-419

If there are questions where there is a yes or no answer, like smart answers or "Do you have any declared convictions?" we've been saving the answer as a boolean value.

However, the old system saves them as a string - "yes" or "no".

So we have to update the renewals engine to save and validate these answers as strings instead (at least until we can fix our technical debt).
The boolean fields were other_businesses, is_main_service, only_amf, construction_waste, declared_convictions, temp_os_places_error and temp_tier_check. This commit changes the data type, updates the form values, changes the validation and then fixes the tests.

Changing the allowed values also affects the AASM routing, so additional changes were needed here.

I would have liked to do these as separate commits, but due to the shared validation, it was difficult to separate.
@irisfaraway irisfaraway self-assigned this Jul 25, 2018
accesslint[bot]
accesslint bot previously approved these changes Jul 25, 2018
Since these fields aren't booleans any more, I renamed the shared validator to reflect what we are actually checking.
Cruikshanks
Cruikshanks previously approved these changes Jul 26, 2018
@irisfaraway
Copy link
Member Author

Didn't mean to dismiss that review – gonna go ahead and merge this.

@irisfaraway irisfaraway merged commit 047a7c4 into master Jul 26, 2018
@irisfaraway irisfaraway deleted the fix/boolean-data branch July 26, 2018 10:53
@irisfaraway irisfaraway added the bug Something isn't working label Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants