-
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
[HOLD for payment 2023-10-30] [$500] IOU - "TBD" is missing in the IOU details of the "Amount" field in offline mode #29553
Comments
Triggered auto assignment to @laurenreidexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~019934d58cfa56e1ed |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When a Distance Request is created offline, the amount of the report preview shows 0.00 instead of "TBD" What is the root cause of that problem?For the Report Preview, we calculate the displayed amount here: App/src/components/ReportActionItem/ReportPreview.js Lines 141 to 159 in e1368c0
However, we do not check if the Report consists only of the distance requests. So if it's only pending distance requests, the amount is set to the default 0.00 What changes do you think we should make in order to solve the problem?In function getDistanceRequestTransactions(iouReportID) {
const allTransactions = TransactionUtils.getAllReportTransactions(iouReportID);
return _.filter(allTransactions, (transaction) => TransactionUtils.isDistanceRequest(transaction));
} In ReportPreview, add a variable: const hasOnlyDistanceRequests = numberOfRequests === _.size(ReportUtils.getDistanceRequestTransactions(props.iouReportID)); And add one more early return in the const getDisplayAmount = () => {
if (reportTotal) {
return CurrencyUtils.convertToDisplayString(reportTotal, props.iouReport.currency);
}
if (isScanning) {
return props.translate('iou.receiptScanning');
}
+ if (hasOnlyDistanceRequests) {
+ return props.translate('common.tbd');
+ }
... This will ensure the following:
Result demonstrating a report with only one pending distance request, and a combination of a pending and loaded one:Screen.Recording.2023-10-13.at.15.17.56.movWhat alternative solutions did you explore? (Optional)We can also modify the subtitle to show not only |
@mananjadhav what do you think of the proposal above? |
@mananjadhav bump ^^ |
Sorry I was OOO yesterday. @paultsimura's proposal will work here. 🎀 👀 🎀 C+ reviewed. |
Triggered auto assignment to @Julesssss, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @mananjadhav Please request via NewDot manual requests for the Reviewer role ($500) |
📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Hey @Julesssss @neil-marcellini, how far do we want to go with displaying the "TBD" on the offline Distance Requests? Which, when coming online, will transform into: |
The PR is ready for review: #29892 |
🎯 ⚡️ Woah @mananjadhav / @paultsimura, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.88-11 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 2023-10-30. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
|
Payment Summary:
|
@mananjadhav bump for checklist to close thanks |
@Julesssss I am unable to track at which point should we have done the offline handling. I can see multiple PRs contributed to the Nevertheless I feel it is easy to miss out the offline flow and hence it makes sense to add a regression test. @laurenreidexpensify @Julesssss Regression Test Proposal:
|
Thanks, yeah I agree this was introduced over many issues. 👍 |
$750 payment approved for @mananjadhav based on BZ summary above. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.83-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
In cases of creating Distance Expense offline, the text "TBD" must be present in the "Amount" field until you go online and update the amount
Actual Result:
In cases where Distance Expense are created offline, the "Amount" field in the IOU details is missing "TBD" and the user is prompted to enter the data manually
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Bug6235636_1697188793732.Recording__521.mp4
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: