-
Notifications
You must be signed in to change notification settings - Fork 121
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
Refactor FormSubmission and FormAnswers #1232
Comments
@jmilljr24 tagging you here - I think it makes sense to move form answer viewing to its own resource, rather than scoped to adotion application review, because orgs might give fosterers a (different) questionnaire as well. Our CSV import is role agnostic so this should work to import answers for fosterers as well, providing emails match. Right? The only thing we need to do is create the FormSubmission on the fosterer. I went back and forth on the best solution here (creating FormSubmission in the CSV import versus creating it when we create the User and Person). Given that we have to have a FormSubmission to make an adoption applcation, we should create the FormSubmission when we create the Person and User. We currently don't do this in the Invite Fosterers flow, so should add this there. The only issue I think our CSV importer might encounter is that if it finds a Person (emails match), it assumes there will be a |
Correct. I would move to it's own resource as you've described. With regard to different questionnaires, we would have an issue where a person is both an adopter and fosterer. If a adopter/fosterer had their adopter questionaire imported first, then had a forster questionaire imported, only their latest form submission would show. This would also mean if the person then went and applied to adopt, the foster questionaire would be associated with that application. I feel like this is starting to get outside the initial intention of the csv upload. Something to think about though.
That would be the easiest and keeps inline with what we have so that's my vote. I'm sure I've been told before( you can remind me next meeting) but I still don't quite understand the idea behind creating the form submission when the person(adopter currently) is created other than the fact we require the adoption application to have a form submission. If the form submission is empty, what is the point?
The error will be rescued and the import will continue. The csv row and error will be displayed(once the pr is complete). I'm indifferent to adding a "fix" or just leaving it as is. It seems like a pretty rare edge case(maybe staff would be testing their form and used their email?). I'm sure there are a bunch of other obscure errors that may pop up during the import. I don't know if it makes sense to clutter up the service. Not to add more complexity, but is there any reason to preclude staff from having questions/answers. If they have the data in the form, maybe it is important? This goes back to where/when the form submission should be created. |
This is a good point. I was thinking that adopters and fosterers can be considered mutually exclusive from the org perspective. If they have worked with a fosterer, they should be comfortable enough processing that person on an adoption with the fosterer details. We can address this assumption if it causes issues in practice.
Yeah this had me thinking as well. We could make the AdopterApplication belong to the Person. Then, we create the FormSubmission during the CSV import, as and when is needed. This will enable all users to technically have a FormSubmission and FormAnswers, which seems fine to me. We do prevent staff from creating adopter applications in the policy permissions, but I don't think we need to change that for now. |
Discussion Notes:
|
To do:
/review_form_submission
(and we load load Form answers fromform_answers/<id>
with turbo frame)/staff/external_form_upload
/staff/adoption_application_reviews/:id
in the Applicant column - so update this with the new link.To do in a follow up issue
Background
We currently show a person's form answers at
/staff/adoption_application_reviews/:id
. We should instead treat them as their own resource scope e.g.,/staff/form_answers/4
.We currently associate FormSubmission with AdopterApplication, but conceptully, this creates an unecessary dependence between the two. We can treat them as entirely separate concepts. The adoption application is the use showing interest. The ForSubmission (and its FormAnswers) represent a snapshot of that user's information. We don't need to connect the two for staff to carry out their application review successfully. All we have to do is show the FormSubmissions (including historic), and the date it was created. Then staff can decide if this is recent enough. We should also let adopters/fosterers see their form answers on the latest form submission so they can decide if they need to update anything.
The text was updated successfully, but these errors were encountered: