-
Notifications
You must be signed in to change notification settings - Fork 9
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 incorrect candidate bachelor degree equivalency #9958
base: main
Are you sure you want to change the base?
Conversation
When a candidate inputs their degrees, they can chose an option called 'Another qualification equivalent to a degree'. This free text field will try to figure out if the value imputed is a bachelor degree or not. Previously we would just check if the free text search value is in our list of Bachelor degrees by checking if the string is included in the list. We didn't match the strings exactly. So if you have the correct keywords, like Bachelor of Medicine and Pixie hunting we would classify this degree as a bachelor degree because there is a valid bachelor degree called `Bachelor of Medicine`. This caused the form to break as there is no valid degree for Pixie hunting in the reference data gem. This commit checks the strings exactly to avoid this issue.
component = render_inline(described_class.new(application_form:)) | ||
expect(component).to summarise( | ||
key: 'Type of bachelor degree', | ||
value: 'Bachelor of Arts in Architecture', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want it to match if the user has inputted bachelor of arts in architecture
? I'm happy to approve as it is -- we don't want to delay the bug fix thinking about what edge cases should / shouldn't be acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean to make the component smart enough to know that it's a bachelor degree even if the capitalisation is not correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested on the review app and things work as expected.
I'm happy to approve as is -- might be worth considering weather we want it to match something that has just been typed lower case (bachelor of arts in architecture), but don't want to delay the bug fix.
Context
When a candidate inputs their degrees, they can chose an option called 'Another qualification equivalent to a degree'. This free text field will try to figure out if the value imputed is a bachelor degree or not.
Previously we would just check if the free text search value is in our list of Bachelor degrees by checking if the string is included in the list. We didn't match the strings exactly.
So if you have the correct keywords, like Bachelor of Medicine and Pixie hunting we would classify this degree as a bachelor degree because there is a valid bachelor degree called
Bachelor of Medicine
.This caused the form to break as there is no valid degree for Pixie hunting in the reference data gem.
This commit checks the strings exactly to avoid this issue. Fixing this sentry error
Changes proposed in this pull request
The
Type of bachelor degree
should only be there for valid bachelor degreesGuidance to review
Go on review app and add a
Another qualification equivalent to a degree
with the keywords of a actual bachelor degree likeBachelor of Medicine
Things to check