-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$1000] A failed IOU request has the “Cancel” feature as a successful IOU request and able to cancel the request #16748
Comments
Triggered auto assignment to @greg-schroeder ( |
Bug0 Triage Checklist (Main S/O)
|
This comment was marked as resolved.
This comment was marked as resolved.
Reviewing now |
Hmm. I couldn't reproduce this where the error message pops up after simulating a network failure and then disabling that - it didn't show an error at all. I tested on staging. @Natnael-Guchima can you check your reproduction steps to make sure nothing is missing? |
One minute, @greg-schroeder. Let me check and get back to you. |
2023-04-05.19.56.24.mp4I can reproduce it in staging, @greg-schroeder. Steps:
The above step should produce the error message. If error is thrown open the failed IOU and click on 'Cancel' button |
Let me try it again, thanks for checking! |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Job added to Upwork: https://www.upwork.com/jobs/~017fdfc602b8fa6805 |
Triggered auto assignment to @roryabraham ( |
No, cancel and decline buttons are removed in favor of the new Delete button on this PR |
@Natnael-Guchima Thanks for the reply. So is this bug still applicable? But instead of Cancel, we should disable Delete if the request failed? |
You are welcome @akinwale. I am not sure if this bug is still applicable. I haven't heard anything from internal team on weather to pursue this or not. |
ProposalPlease re-state the problem that we are trying to solve in this issue."Cancel" button in the IOU details modal is being displayed for failed IOU requests. It is assumed that the Cancel button has been replaced by the "Delete" button based on this PR: #17583. This proposal will assume the Delete button going forward. What is the root cause of that problem?The filter for deletable transactions in the App/src/pages/iou/IOUTransactions.js Lines 67 to 74 in 1b1e562
What changes do you think we should make in order to solve the problem?Add a filter to remove transactions that have a
Alternatively, if the button should not be displayed for all transactions that have a pending action, then the filter can be defined as such:
What alternative solutions did you explore? (Optional)None. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The failed IOU request is still deleable What is the root cause of that problem?In App/src/pages/iou/IOUTransactions.js Lines 67 to 74 in 1ee8cf8
We get the deletable transactions without filtering out the errors transaction What changes do you think we should make in order to solve the problem?Solution 1: If we don't want to show the delete button Filter out the error action by adding the following line:
Solution 2: If we want to disable the delete button
Improvement We should move this line App/src/pages/iou/IOUTransactions.js Line 86 in 1ee8cf8
outside of map function to improve performance. What alternative solutions did you explore? (Optional) |
@tienifr your proposal with solution 1 LGTM 👍🏼 |
📣 @tienifr You have been assigned to this job by @roryabraham! |
Also, would love to see some automated tests cover this change 🙏🏼 |
@roryabraham thanks for the proposal review in advance. @tienifr's Solution 1 looks good to me too! |
Per discussion:
We're going to close the issue/PR and pay this out. |
@tienifr, @Natnael-Guchima, @0xmiroslav offers sent |
Accepted. Thanks! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
“Cancel” button for failed IOUs shouldn't be clickable and should be disabled or hidden from the UI
Actual Result:
“Cancel” button for failed IOUs is active and clickable
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.92-0

Reproducible in staging?:
Reproducible in production?:
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
Notes/Photos/Videos: Any additional supporting documentation
2023-03-30.10.40.19.mp4
Recording.99.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1680162826186869
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: