Better error message where partner's served areas % client share left blank.
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.
Hi there! I'm new to contributing but I would like to give this a shot :)
Please do!
Hi @cielf , I’m new here and interested in contributing to issue #4673 by improving the error message for the client share field.
Hi @princekumarg12 We usually just have one person assigned at a time (unless two people are working together on something) to avoid duplication of effort. Please check whether there is a) someone already assigned or b) a recent Open PR before working on an issue.
Currently still working on setting things up. My computer has just generally been having issues :( Will go to Slack channel with any questions
Hi @cielf, this setup is taking me more time than I thought. I'm still going to complete it because I'd like to be able to make future contributions, but can you unassign me for now so maybe someone else who's already ready can address this issue? Thanks :)
Done.
Hi, I see that the person who was previously assigned to this issue was unassigned. Could I please be assigned to work on this issue? Thanks!
You've got it!