-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
Fix bizarre issue with individual requests #4069
Comments
So I figured out the issue with the text field, but I am having some issues reproducing the request number issues. I follow the steps: fail the first time, return and make a request for Briefs for 1 Person. My request is created for 50 briefs. @cielf I can't reproduce a discrepancy in those values between failing first and not failing. Could you make a video maybe? Or by chance do the partners have confusion as to why a request for 1 individual results in an order of 50 items? |
It should be partner. That could be a separate issue, though it might be related... |
Were you trying to recreate the bizarre numbers before or after you addresssed the text field -- could be related? Don't have time to make a video in the moment. |
I haven't made any changes yet. So before. The code multiplies the number of users by a default amount per item. So if you enter 10 people and select diapers, you'll get 500 diapers cause the default is 50 per person. Just want to make sure that isn't what is causing confusion. |
Oh, no that's not the confusion. It's more like you enter 10 people and get 20470 or some other strange number. I'm not even sure it's a multiple of the number of people always. |
Gotcha. I could not reproduce that, so when you get a chance if you could upload a video. In the meantime I'll make a draft PR for just the input field fixes (maybe that will fix it?) and take a video of my own steps (maybe I'm doing something wrong?) Also could the partner type matter? I was using the verified partner account. |
Yeah... I just tried it with verified and it worked. I was probably reproducing it with a copy of the production date, so I'm wondering if it might be due to something like an unset quantity on the item. (Edit -- the Adult Briefs L/XL does not have a quantity set in the seed, so that's not it...) |
I swear this happened! (I even demonstrated it to someone else). But I haven't been able to recreate it for that last half hour. |
Addresses part of issue rubyforgood#4069: After a request bad request is submitted the select input disappears and turns into a text input. This was caused by formatted_requestable_items not being set. Refactors setting @formatted_requestable_items to a private method call. Unifies all the behavior of setting requestable items. Adds additional tests to ensure select fields have correct values. feat: adds TODOs
I got the rest of it fixed. So up to you as to the next steps, my PR is reviewable, I am just leaving it as a draft for if we do manage to reproduce the bug. |
Well -- if it blocks the bug from happening, that's pretty good. I will try a few more times, but we might have to concede that it's hiding well. Also -- fixing the select issue will significantly reduce the support load from the partners, I believe. So, I would say let's go ahead with reviewing your PR as a partial fix |
Addresses part of issue rubyforgood#4069: After a request bad request is submitted the select input disappears and turns into a text input. This was caused by formatted_requestable_items not being set. Refactors setting @formatted_requestable_items to a private method call. Unifies all the behavior of setting requestable items. Adds additional tests to ensure select fields have correct values. feat: adds TODOs
@elasticspoon I just noticed that if you do have an error on the individual requests page, you lose all the input. That's not happening on the quantity request page, so it may be related to the bizarre issue. |
…ssue fix: select fields on request pages (#4069 partial)
@cielf I was trying to reproduce the second part of the issue to complete it fully. But couldn't find it, if you remember how to do it, I would be happy to handle part 2 of this issue. To close it within a short period. In the process, I found other potential issues related to this feature, but they are more minor and most likely not the priority. Here is a short list to collaborate with PM: Potential Issues:
|
I'm closing this issue. I think the fixes elasticspoon putt in effectively block the problem from happening, so it is far less of an issue. |
And I'll add the items you mentioned to the input queue. |
Though the donation shouldn't have a shipping cost. We've only implemented that for distributions. |
Technically a 5 digit year is valid, just obviously wrong in context. |
@cielf happy to have helped just with the research I did. |
Summary
There is a sequence that causes the amount on the individual requests to be large and strange. See details.
Why fix?
Too many support requests from partners. Partner confusion and frustration for both the partner and bank.
Recreation of the problem
Sign in as a partner. Click on "Create request" under "# of individuals.
Fill in a number, without selecting an item.
Click submit request.
This gives you an error, AND the item selection is a text field rather than a selection field. (That's a problem, to be sure.)
Then click on dashboard, and Click on "Create request" under "# of individuals.
Select an item and provide a number. Click "submit request".
The request created will (I should say may, but I tried it a couple of times) have a value other than the one entered.
Criteria for completion
The text was updated successfully, but these errors were encountered: