Comments (22)
Proposal
Please re-state the problem that we are trying to solve in this issue.
Total amount is incorrect when resolving duplicated transactions.
What is the root cause of that problem?
When merging duplicates, we subtract the current report amount from all the duplicated transaction amounts.
Lines 7679 to 7692 in df69c80
However, the duplicated transaction array has duplicated items. When we have transactions 1 and 2, open the 1st transaction thread, and press Keep this one on the 2nd transaction, the duplicated transaction array will be [1, 1].
That's because the array contains the duplicates and also the reviewingTransactionID
.
reviewingTransactionID
is the transaction that we are currently reviewing. From the OP steps, we open transaction 1 and press Review duplicates, so the reviewingTransactionID
is 1. duplicates
contains the duplicated list of transactions. For example, transaction 1 duplicates list is [2], while transaction 2 duplicates list is [1]. Combined, we get [1, 1].
What changes do you think we should make in order to solve the problem?
Instead of combining reviewingTransactionID
and duplicates
, we can just use duplicates
.
const allTransactionIDsDuplicates = duplicates;
What alternative solutions did you explore? (Optional)
Remove duplicated items from the array.
Array.from(new Set(allTransactionIDsDuplicates))
from app.
weird, I wrote this code and I recall it working as expected when I tested it. Maybe I made a mistake or something else changed since then. Anyways, LGTM ππΌ
from app.
Triggered auto assignment to @roryabraham (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
from app.
π Friendly reminder that deploy blockers are time-sensitive β± issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
from app.
We think that this bug might be related to #wave-collect - Release 2
from app.
definitely front-end since it's only for optimistic state
from app.
confirmed that dupe detection is still behind a beta so demoting this.
from app.
Job added to Upwork: https://www.upwork.com/jobs/~01bae72e20bb144f65
from app.
Triggered auto assignment to @CortneyOfstad (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
from app.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External
)
from app.
@bernhardoj's proposal works here.
πππ C+ reviewed.
from app.
Current assignee @roryabraham is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
from app.
π£ @akinwale π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
from app.
PR is ready
cc: @akinwale
from app.
Triggered auto assignment to @muttmuure (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
from app.
@muttmuure I am heading OoO until Tuesday (Aug. 6) so reassigning to keep eyes on this in the meantime β thanks!
from app.
@akinwale, @CortneyOfstad, @muttmuure, @roryabraham, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
from app.
Reviewing
label has been removed, please complete the "BugZero Checklist".
from app.
The solution for this issue has been π deployed to production π in version 9.0.17-2 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-08-14. π
For reference, here are some details about the assignees on this issue:
- @akinwale requires payment automatic offer (Reviewer)
- @bernhardoj requires payment through NewDot Manual Requests
from app.
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:
- [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
- [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
- [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
- [@akinwale] Determine if we should create a regression test for this bug.
- [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
- [@CortneyOfstad / @muttmuure] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
from app.
- [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
- [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
- [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
This was a regression from #42503. Comment.
- [@akinwale] Determine if we should create a regression test for this bug.
- [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Steps
- Launch Expensify
- Open a workspace chat report
- Submit two similar expenses (same amount, currency and merchant)
- Click on the expense preview in the main chat report
- Click on the first expense
- Go offline
- Click Review duplicates
- Click Keep this one on the second expense
- Click Confirm on the confirmation page
- Navigate back to the expense report
- Verify that the total amount is the same as the selected expense amount
- Navigate back to the main chat report
- Verify that the report preview amount is the same as the selected expense amount
- Navigate back to LHN (on mobile)
- Verify that the total amount in the LHN for the last message is the same as the selected expense amount
Do we agree π or π?
from app.
Payment Summary
@bernhardoj -- to be paid $250 via NewDot
@akinwale -- paid $250 via Upwork
Regression test here
from app.
Related Issues (20)
- iOS - Search - Inconsistency in selection mode behavior after holding and unholding expense HOT 6
- Tax - Incorrect tax name in editor after creating a new rate with the old name of existing tax HOT 4
- Search filters - Tag in X: Y format is displayed in X\:Y style HOT 7
- Don't set the user's timezone if it's empty HOT 6
- Workspace - Invited member can't be tapped for a while after the invite HOT 4
- Make medium the default button size HOT 1
- Workflows - App closes approval workflow RHP after upgrading from Additional approver page HOT 5
- Attachment - Sometimes the taken picture is closed upon zooming out or moving the image HOT 2
- Investigate workflow job failing on main: e2ePerformanceTests / Build apk from delta ref HOT 3
- Workflows - Back button on workspace editor reopens Workflows after adding workflow HOT 6
- Workflows - Error message for Additional approver remains when reopening the setup HOT 6
- "Deployed to Prod" message not posted in PRs deployed to prod HOT 2
- Notifications still received for #rooms you have or for threads you have viewed but not joined HOT 3
- Submitting a receipt shows $0.00 and tapping on it "not found" message HOT 3
- Html codes appear in the SMS when a new member joins domain HOT 1
- Card Expense - After a card transaction is placed, a second expense is created with no amount HOT 2
- Clicking on a SmartScanned expense from the past date throws a Hmm error and unable smartscan from that date HOT 2
- Using iOS quick actions to "SmartScan Receipt" on the Expensify Hybrid app gets stuck on the green startup screen HOT 1
- Investigate workflow job failing on main: e2ePerformanceTests / Build apk from delta ref
- Investigate workflow job failing on main: e2ePerformanceTests / Build apk from delta ref
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app.