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

Add a confirmation page to partner requests. #3052

Closed
cielf opened this issue Jul 25, 2022 · 45 comments · Fixed by #4553
Closed

Add a confirmation page to partner requests. #3052

cielf opened this issue Jul 25, 2022 · 45 comments · Fixed by #4553
Assignees

Comments

@cielf
Copy link
Collaborator

cielf commented Jul 25, 2022

Summary

Add a confirmation step to partner requests

Justification

Non-profits are often staffed with folks with limited technical skills and sometimes make mistakes with their requests. This puts and extra burden on the essentials banks as they then need to get in contact with their partners and see if they really did intend to order 5000 rather than their usual 500 diapers. We need to add in a confirmation page summarizing the request and ask for confirmation from the partner before this request is placed to the diaper bank.

Details

There are three different ways to make a request (partners/requests/new, partners/family_requests/new, partners/individuals_request/new). The confirmation page information is the same for each of them

It will show a list of the items requested and number requested for each, along with the text "Please confirm that the above list is what you meant to request" and buttons "No, I need to change something." and "Yes, it's right"

Additionally, if a quota is in place, warn partners from accidentally making a request that is over the quota unintentionally. "Oops! You are ordering 9999999 of something, are you sure?"

Clicking "No..." will take them back to the requests page they came from so that they can adjust their ask. Clicking "Yes..." will take them to the current

Clicking "Yes" will submit the request and show the submitted page for that request, as it does now.

Things we should know

History: This was raised by Sean a long time ago as rubyforgood/partner#354. There was even a pull request for it. It was closed but remained on the project initiatives board. CL took the backlogs for partner-facing items to the July 2022 partnerbase working group, where this was identified as one of the higher priority asks, as it does burden the essentials banks.

There has been some discussion in the partnerbase working group about whether the quota is a weekly or monthly quota. For the purposes of this issue, treat it as a per request quota of total items, as most partners only do one request for month.

Criteria for Completion

-[] Add in a confirmation page when partners issue a request, as described above
-[] Add in relevant tests
-[] Tests pass

@edwinthinks
Copy link
Collaborator

@cielf I'd love to take this one :)

@edwinthinks edwinthinks self-assigned this Jul 31, 2022
@cielf
Copy link
Collaborator Author

cielf commented Jul 31, 2022 via email

@cielf
Copy link
Collaborator Author

cielf commented Jul 31, 2022

FYI the same functionality, but for distributions is in the backlog as well.

@github-actions
Copy link
Contributor

This issue has been inactive for 251 hours (10.46 days) and will be automatically unassigned after 109 more hours (4.54 days).

@edwinthinks
Copy link
Collaborator

I'll need some help thinking of the UX for this

@edwinthinks edwinthinks added the BLOCKED This issue is blocked by another label Oct 31, 2022
@github-actions
Copy link
Contributor

This issue has been inactive for 250 hours (10.42 days) and will be automatically unassigned after 110 more hours (4.58 days).

@github-actions
Copy link
Contributor

This issue has been inactive for 370 hours (15.42 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.

@dorner
Copy link
Collaborator

dorner commented Nov 18, 2022

This is also blocked on #3214 .

@cielf
Copy link
Collaborator Author

cielf commented Feb 16, 2023

I'm pretty sure this is no longer blocked on #3214. Not sure what the issue was that was blocking it before -- @edwinthinks - can you clarify -- is it blocked for you, because of need of help with thinking of the UX, or blocked for anybody?

@cielf
Copy link
Collaborator Author

cielf commented Mar 15, 2023

I don't think this is still blocked.

@cielf cielf removed the BLOCKED This issue is blocked by another label Mar 15, 2023
@lokisk1155
Copy link
Collaborator

I can take this one also

@dorner
Copy link
Collaborator

dorner commented May 28, 2023

@lokisk1155 this and the other one are both pretty hefty pieces of work. I'd suggest picking one.

@lokisk1155
Copy link
Collaborator

lokisk1155 commented May 28, 2023

@dorner cielf said that this one and #3090 are very similar so it makes sense to take both. But I can start with just one.

@cielf
Copy link
Collaborator Author

cielf commented May 28, 2023

Well - it's also possible that you'll run out of time on one before finishing the other -- it's the same pattern, but @dorner is right that they are good chunks of work. They are also old enough that the odds of someone else taking the other one in the meantime is relatively low.

@lokisk1155
Copy link
Collaborator

@cielf @dorner Np I will start with this one because you guys are already in the thread

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

This issue has been inactive for 248 hours (10.33 days) and will be automatically unassigned after 112 more hours (4.67 days).

danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 19, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 19, 2024
@danielabar
Copy link
Contributor

Just posting a status here (still wip), I had the family request confirmation working in an earlier commit at comment here, but after rebasing, it no longer works. It thinks the request is invalid (completely empty request) even though the request is actually valid. Will investigate further...

danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 21, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 21, 2024
@cielf
Copy link
Collaborator Author

cielf commented Jul 25, 2024

Hey @danielabar -- Just thought you should be aware of the [PACKS] line of issues if you aren't already. I'm pretty sure this will be going in well before we're ready to enable them, but we will be needing to update this as well (after the fact) to bring it in line before we do. [So many moving parts!] That probably doesn't have to be you.

@danielabar
Copy link
Contributor

I'm not familiar with the PACKS feature, can you point me to the ticket(s).

For the partner confirmation, it's working and tested, just left with some refactoring to do.

danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
1. Quantity requests
2. Individual requests
3. Family requests
danielabar added a commit to danielabar/human-essentials that referenced this issue Jul 27, 2024
@cielf
Copy link
Collaborator Author

cielf commented Jul 27, 2024

#s 4396 to 4308 plus 4501 (an overall qa pass)

danielabar added a commit to danielabar/human-essentials that referenced this issue Aug 3, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Aug 3, 2024
danielabar added a commit to danielabar/human-essentials that referenced this issue Aug 4, 2024
Swapping out after_save for after_validation AR callback supports the
use of the total_items method on a Request model that has been
initialized, but not yet saved to the database.
@danielabar
Copy link
Contributor

Update: Addressed PR feedback although the most recent commit has a test failure when the events flag is on: https://github.com/rubyforgood/human-essentials/actions/runs/10237022770/job/28319804139

Will try to enable that flag locally and see if/how that distribution test fails.

@danielabar
Copy link
Contributor

Update: All the tests are passing now, although I didn't change anything from yesterday's comment when there was a failure. Wondering if someone re-ran the tests on CI and that's a known intermittent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants