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

Improving the child functionality #3797

Closed
4 tasks
cielf opened this issue Jul 30, 2023 · 29 comments · Fixed by #4495 or #4528
Closed
4 tasks

Improving the child functionality #3797

cielf opened this issue Jul 30, 2023 · 29 comments · Fixed by #4495 or #4528

Comments

@cielf
Copy link
Collaborator

cielf commented Jul 30, 2023

Summary

The current child functionality only allows one item per child. It should allow multiple. Show the items attached to the child on various lists.

Why change

This is a sticking point in the use of the child requests for at least some banks/partners. For instance, you might need both diapers and baby wipes, but you can't ask for that.

Details

When entering/editing a child, you should be able to choose multiple items [for example both Baby Wipes and Kids (Size 1)]. You currently can only choose one item.

There will obviously be model changes involved in implementing this, as the item is currently saved as an integer on the child model.

The children export will need to show the multiple items

The child index and the children information in the family should show the items -- for ease of review, as children age out of diaper sizes quickly

The child request index should show all the items attached to each child, and the child request functionality will need to be adjusted to take into account the multiple items.

Adding the ability to change the items needed from the child request page would also be grand, but it can be a followup issue

Notes

@cielf says: I took a look at the production data, and there are remarkably few cases where someone has used the loop hole of entering multiple kids with the same name.
Our most engaged banks don't make a lot of use of the child functionality, but to some extent they don't because it isn't good enough - and the reason mentioned most is the lack of multiple items.

Criteria for completion

  • Multiple items can be attached to a child, with all the functionality around families, children and child requests working smoothly with that.
  • Can see the items in the child request index, and the children info in the family
  • tests to support the functionality

Bonus round

  • add the ability to change the items needed from the child request page as well
@cielf cielf added Help Wanted Groomed + open to all! Difficulty—Advanced labels Jul 30, 2023
@patelkrunal31
Copy link
Collaborator

I would love to explore this one.

@dorner
Copy link
Collaborator

dorner commented Aug 23, 2023

Give it a shot!

@github-actions github-actions bot removed the Help Wanted Groomed + open to all! label Aug 23, 2023
@awwaiid
Copy link
Collaborator

awwaiid commented Aug 27, 2023

An idea for you @patelkrunal31 is to make the child's name linkable on the child-request page, so that they could go make quick-edits as needed there. For you to consider :)

@github-actions
Copy link
Contributor

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

@github-actions github-actions bot added the stale label Sep 27, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

Automatically unassigned after 7 days of inactivity.

@cancelei
Copy link
Contributor

@cielf Can you tell me if this issue is still open for contributions?

I wonder what happened to the other 2 more experienced developers than me on the path of arriving. Will default to "they gave up" if you don't enlighten me about what happened.

From the PR made by Mr. Isidzuki, I learned that it should follow a bit of a "clumpsy-looking" feature, instead of creating a fancy keyboard-activated multi-items selection capability.

@cielf
Copy link
Collaborator Author

cielf commented Mar 30, 2024

Yes it is. I believe that pr was very close to getting merged, but they chose to abandon it.

@awwaiid
Copy link
Collaborator

awwaiid commented Mar 31, 2024

And I think we need to migrate our has-one into this has-many list of per-child item requests.

@cancelei
Copy link
Contributor

cancelei commented Apr 2, 2024

@cielf I can take this one. But with your support on bringing more clarity over what is expected also known as DoD, as we talked in the last meeting.

@cielf
Copy link
Collaborator Author

cielf commented Apr 3, 2024

I'm not familiar with the DoD abbreviation, other than as "Department of Defense".

As mentioned, I can add some wireframes -- but I won't get to that until later in the week. (Edit: Possibly later)

As wrritten, this was marked Difficulty-Advanced because it requires a lot of prior familiarity with the system -- the individual bits of coding that have to be done are not so very very hard, but the issue assumed the capacity to know what to do in the context of the system.

@cancelei
Copy link
Contributor

cancelei commented Apr 4, 2024

@cielf DoD is a Scrum-related abbreviation for Definition of Done. But I will work with what I have and do my best to unstruck this issue that hasn't been handled for some time. I believe my "working unit" (me and the tech mentor) can handle this issue in 2 weeks starting from the day of attribution.

In regards to the front end/wireframe, what I understood from our last meeting was something like that:

image

If you think that's a good start, I can continue to build it out and present it next Sunday to the team.

@cielf
Copy link
Collaborator Author

cielf commented Apr 5, 2024

Looks like we still have a gap in understanding...
The items should be chosen on the child, the child chosen on the request (as they are now).

@cancelei
Copy link
Contributor

cancelei commented Apr 5, 2024

@cielf I recorded a 2min video pitch of what I built so far. I didn't change quantity of items per child when a request is made, so they appear as 50 units. When 1 item is selected for the child, it is implicitly choosing the child already, but I can implement front end features to reflect as if it had characteristics of what pre-existed, if that is desired. All those aspects would be clearer when the wireframe arrives.

Hope you like it. 🤓
Loom

@cielf
Copy link
Collaborator Author

cielf commented Apr 5, 2024

So the edit child screen would look something like this....
Screenshot 2024-04-05 at 10 53 35 AM
The view child screen would be the same except for showing multiple items. (Label will say item(s) instead of item)
The child request screen would be the same except for showing multiple items. (header will say item(s) instead of item)
Of course, the multiple items will have to be added into the actual request.

@cielf
Copy link
Collaborator Author

cielf commented Apr 5, 2024

for clarity, we are choosing the child, not the items when we are making the request.

@cielf
Copy link
Collaborator Author

cielf commented Apr 5, 2024

A note on your choice for the selection of many items -- The drop-down select many might not work the same across browsers, so it may end up resulting in support issues. That is what drives the version in the wireframe.

@cancelei
Copy link
Contributor

cancelei commented Apr 5, 2024

What about the quantity of items? should there be a new screen before completing the request and after choosing the child for the amount per item to be inserted? Or is this not relevant for now?

@cielf
Copy link
Collaborator Author

cielf commented Apr 5, 2024

The number of items per child is actually determined by the bank -- there is a field for that on the item itself. For the most part diapers happen to be 50 -- and I believe we default to that if the bank doesn't specify. So that should be handled the same way it is now.

@cielf
Copy link
Collaborator Author

cielf commented Apr 5, 2024

Check how it is calculated now for the single item per child case...

@cielf
Copy link
Collaborator Author

cielf commented Apr 5, 2024

For clarity, this is how I see the screen under Child Request looking.

Screenshot 2024-04-05 at 11 24 22 AM

@cielf
Copy link
Collaborator Author

cielf commented Apr 5, 2024

(of course you have to handle each item on the child when creating the actual request -- I would hope that goes without saying g)

Copy link
Contributor

github-actions bot commented Jul 8, 2024

Automatically unassigned after 7 days of inactivity.

@awwaiid
Copy link
Collaborator

awwaiid commented Jul 14, 2024

@elasticspoon unfortunately in prod data there are children with a item_needed_diaperid set but no corresponding Item record. I'm not sure what caused those.

@awwaiid
Copy link
Collaborator

awwaiid commented Jul 14, 2024

er -- and the release is blocked until we fix or revert, FYI

@elasticspoon
Copy link
Collaborator

Mmmm. Interesting you should probably revert and I'll fix the migration later.

It should be an easy fix but I'm not at PC for a bit.

@cielf
Copy link
Collaborator Author

cielf commented Jul 14, 2024

FYI There was only one other, very minor, bank-facing thing on the release, so we're good with holding it to next week.

@awwaiid
Copy link
Collaborator

awwaiid commented Jul 14, 2024

Also there are only like 7 children records affected now that I dug in a bit, so likely outcome after an investigation is skipping those.

diaper_dev=# select count(distinct(children.id)) from children left join items on children.item_needed_diaperid = items.id where children.item_needed_diaperid is not null and items.id is null;
 count
-------
     7

@elasticspoon
Copy link
Collaborator

elasticspoon commented Jul 14, 2024

That's fair. I would also like to make sure those can't reappear in the future tho. So I'll add tests for the case where the child has items and either the child or item is deleted.

Not sure tests actually make sense because there are no controller actions to delete children or items for partners.

@cielf
Copy link
Collaborator Author

cielf commented Jul 15, 2024

FWIW, after taking a look at the child records involved, skipping them does make sense to me. They haven't been updated in over a year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment