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

Better error message where partner's served areas % client share left blank. #4673

Open
2 tasks
cielf opened this issue Sep 29, 2024 · 2 comments
Open
2 tasks
Assignees
Labels
Good First Issue Suitable for users that are newer or less experienced hacktoberfest

Comments

@cielf
Copy link
Collaborator

cielf commented Sep 29, 2024

Summary

The error message that appears if you leave a client share blank in the partner profile is not helpful. Make it better.

Why?

Reduce partner and bank frustration.

Details

For background, See discussion on PR 4345, but it's probably not necessary to do that to fix this.

Recreation

sign in as [email protected]
Click "Partner Agencies", then "All Partners". Click a Partner, then scroll down and click "Edit information".
Find the Area Served section
Click "Add Another County".
Choose a "County or Equivalent". Do not fill in the client share % field beside it.
Go to the bottom of the page and click "Update Information".

You will get an error like : "Something didn't work quite right -- try again? Validation failed: Served areas client share is not a number, Served areas client share is not included in the list".

What needs to happen

The "is not included in the list" bit is confusing. We'd rather see "must be between 1 and 100".

Hint:

The "is not in list" appears to come from using validates inclusion on served_area.rb line 19 -- add a custom message instead, message: {"Client share must be between 1 and 100 inclusive."}

Criteria for completion

  • error message changed as described
  • automated tests to confirm the behaviour.
@cielf cielf added hacktoberfest Good First Issue Suitable for users that are newer or less experienced labels Sep 29, 2024
@iallah1
Copy link

iallah1 commented Oct 3, 2024

Hi there! I'm new to contributing but I would like to give this a shot :)

@cielf
Copy link
Collaborator Author

cielf commented Oct 4, 2024

Please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Suitable for users that are newer or less experienced hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants