-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-07-10] [$250] Partial approved reports don’t have GBR in the LHN #43014
Comments
Triggered auto assignment to @johncschuster ( |
I was able to reproduce it. But after a while, the GBR is displayed in the LNH without any updates from me!! |
Job added to Upwork: https://www.upwork.com/jobs/~01a11884101dc8ca36 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The newly created report is not GBRed in the LHN What is the root cause of that problem?When checking if the chat report should show GBR in optimistic data of If the However, after "partial approval/payment" is introduced, this is no longer working well because when the user "partially approve/pay" an IOU, that IOU is still requiring action (for the partial part that's not approved/paid). So in this case a What changes do you think we should make in order to solve the problem?Update this Line 6182 in 4fcc5a9
excludedIOUReportID . excludedIOUReportID should only be there, we should only exclude it if the approval is full .
What alternative solutions did you explore? (Optional)Pass the In addition, the condition
Additional: I notice that in Line 5914 in 4fcc5a9
hasOutstandingChildRequest is always set to false , this is not always true because there could be IOU report that still pending approval. Ideally hasIOUToApproveOrPay should be used here too, like for approval.
|
Updated proposal to add some details |
ProposalPlease re-state the problem that we are trying to solve in this issue.When partially approving reports we dont have GBR in LHN What is the root cause of that problem?In case of partial approval we will always have to show GBR as there will always be some pending approvals after partially approving. What changes do you think we should make in order to solve the problem?Since for partial approval the pending expenses can be approved we can set hasOutstandingChildRequest: full ? hasIOUToApproveOrPay(chatReport, expenseReport?.reportID ?? '') : true, What alternative solutions did you explore? (Optional)NA |
@allgandalf IMO since approving full while there's held request is a risky action (questionable request that was held, will be approved), it should always be "default partial", unless the user approves "full" by confirming. In case of this, the user didn't confirm to approve full, so the default should be "partial". That's also how it works now. |
Currently when user Approves from Report preview all the held transactions are getting unheld. |
The optimistic data when offline indicates it's default "partial", not full, same for the held transactions, they are not unheld in offline mode. We need to explicitly pass Even better, add the confirmation dialog when pressing Whatever we go with, this will likely be a separate GH issue as the root cause is different and it's happening regardless of this OP issue. @allgandalf Let us know what you think, if you're confused what "separate issue" this is, I'd be happy to provide more details & screenshots |
@dominictb I agree this is not handled in offline mode currently but if you approve from Report view it without sending full flag as true even in the API is considered as full payment which in turn changes the transactions which are on hold to unheld. |
@DivyamUp14 , this is not true, The held transaction is indeed still on hold, it's the UI which is buggy but that is something which would need a completely different issue and detailed conversation. The held requests are still on hold after approving other requests in the same transaction thread. |
@allgandalf I checked the response data for transaction in the next request after approval and it returns data with transaction with unhold status. In the UI it is not updated because the optimistic data set in approval API is based on the full parameter which is not sent at the time of approving from Request preview |
@allgandalf I agree 👍 Especially when
And I don't see any reason why we shouldn't
@allgandalf Do you think we should open a Slack thread to discuss this? I'd be happy to help start it if we should. Meanwhile we can continue to evaluate proposals for the OP issue, the above will be handled as a separate issue after the discussion. |
@johncschuster , I was 😷 last few days so worked low key, feeling much better now, will review the proposals this week for sure, I just need to get one thing cleared about this issue about this comment, when i tested even though the UI didn't show any held request when i clicked approved for that single held expense, i was prompted with the approve partial/full prompt, so I will test again tomorrow and then review proposals above , thanks and sorry for the delay |
No worries, @allgandalf! Thanks for the update! I hope you're feeling better! |
@allgandalf what's the latest here? Were you able to test this again? |
sorry for the delay reviewed another high priority PR yesterday. I do get a GBR when i approve expense, followed the OP steps: Screen.Recording.2024-06-13.at.9.23.29.AM.movis anyone from the contributor able to reproduce it? if yes can you please attach a video of the steps followed :) Good times 🥂 |
@allgandalf the issue is with data not being optimistically set, Once you approve the GBR disappears and then after the API response it shows up. |
📣 @dominictb 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@dominictb @DivyamUp14 thank you both for carefully approaching this problem and explaining your solutions. It was very easy for me to read through this issue comment by comment and understand what was going on. Great work! @dominictb congrats on having the selected proposal, feel free to raise a PR. @allgandalf thank you for carefully considering and testing the proposals for regressions. Feel free to tag me in discussions related to that bug you found and I can make sure we create an issue and look into it. |
Deployed to staging 3 days ago 👍 I'll issue payment once it clears the waiting period. |
It's been 6 days since deployed to staging. We're almost there. |
@blimpich I noticed the PR linked above was deployed a week ago to staging, but hasn't yet been deployed to production. Do you know why we haven't deployed it yet? |
That should indeed be deployed to production the deploy list associated was closed 5 days back, My guess is automation failed |
@allgandalf I'm not quite following. Are you saying the PR has been deployed to production, but there's no comment making that known, or are you saying it hasn't been deployed to production because an automation may have failed? |
yes the PR has been deployed to production, the updated code exists on the production branch: Line 6247 in b868a00
Can you please pay this out :) |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-07-10. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Melvin 🙃, this is ready for payment, the PR was deployed to production in the last release and not this!!! |
Thanks for calling out that the code has been deployed to prod, @allgandalf. I've issued payment! Can you please complete the BZ Checklist above? |
Regression Test Proposal
Do we agree 👍 or 👎 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.78-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @JmillsExpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1717128748434439
Action Performed:
Expected Result:
The newly created report for the held expense is GBR’ed in the LHN
Actual Result:
The newly created report is not GBRed in the LHN
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Recording.170.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @johncschusterThe text was updated successfully, but these errors were encountered: