rubyforgood / casa

Volunteer management system for nonprofit CASA, which serves foster youth in counties across America.
https://casavolunteertracking.org/
MIT License
314 stars 478 forks source link

Case Contact Form Update: Change Section "1. Select the relevant cases" picker to Dropdown style like in Section 2. Select All Contact Types #5776

Closed bcastillo32 closed 4 months ago

bcastillo32 commented 5 months ago

What type(s) of user does this feature affect?

Description:

In the volunteer view of the case contact form (/case_contacts/:id/form/details), there are typically only two or three cases under the “select a case” question.

Image

However, in the supervisor view, they see all cases handled by their volunteers. In the supervisor view, this question can be overwhelming to view.

Image

Please apply the same picker style from Section 2 to section 1 in the Case Contact form.

image image

Criteria for completion:

How to access the QA site

Login Details:
Link to QA site

Login Emails:

password for all users: 12345678

Questions? Join Slack!

We highly recommend that you join us in slack #casa channel to ask questions quickly. And discord for office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.

kenny-luong commented 4 months ago

Happy to work on this

kenny-luong commented 4 months ago

So I noticed an issue with one of the specs.

spec/system/case_contacts/new_spec.rb

line 128: re-renders the form with errors, but preserving all previously entered selections

My understanding of this spec is that it's not only testing error enforcing, but also making sure that it retains the previous selections.

It seems that "Contact Type" is not actually a required field despite being labeled as one.

image

You can actually move forward in the form without having selected a contact type.

This is happening because we call complete_details_page twice. The first time will select all of the contact types as expected but the second call actually removes all of the selections.

Thoughts on what we want to do here? This is preventing me from updating the spec to handle the case selection.

My initial suggestion is to create another method targeted at filling in the missing field (in this case, it would be the medium type) or changing the missing field to be the case ids instead.