human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

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

Open cielf opened this issue 1 year ago • 5 comments

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 avatar Sep 29 '24 14:09 cielf

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

iallah1 avatar Oct 03 '24 20:10 iallah1

Please do!

cielf avatar Oct 04 '24 15:10 cielf

Hi @cielf , I’m new here and interested in contributing to issue #4673 by improving the error message for the client share field.

princekumarg12 avatar Oct 08 '24 18:10 princekumarg12

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.

cielf avatar Oct 09 '24 14:10 cielf

Currently still working on setting things up. My computer has just generally been having issues :( Will go to Slack channel with any questions

iallah1 avatar Oct 15 '24 00:10 iallah1

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 :)

iallah1 avatar Oct 24 '24 00:10 iallah1

Done.

cielf avatar Oct 24 '24 01:10 cielf

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!

McEileen avatar Nov 03 '24 16:11 McEileen

You've got it!

cielf avatar Nov 04 '24 01:11 cielf