Removing violations for duplicate transactions.#65107
Removing violations for duplicate transactions.#65107iwiznia merged 54 commits intoExpensify:mainfrom
Conversation
|
@hungvu193 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid.movAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafarimSafari.movMacOS: Chrome / SafariScreen.Recording.2025-06-30.at.15.18.25.movScreen.Recording.2025-06-30.at.15.22.19.movMacOS: DesktopDesktop.mov |
iwiznia
left a comment
There was a problem hiding this comment.
Should we be updating the deprecated onyx connect calls in the modified file or how are we handling that migration?
* Refactoring `updateDuplicateTransactionViolation` function. * lint * Restored src/index.js
Well, it's a strange bug. I don't know the exact root cause, and I still need time to find the root cause, but I think it has to do with caching in the onyx module. Since |
src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx
Outdated
Show resolved
Hide resolved
src/libs/TransactionUtils/index.ts
Outdated
| } | ||
|
|
||
| if (duplicateTransactionViolations.length > 1) { | ||
| Log.warn(`There are ${duplicateTransactionViolations.length} duplicate transaction violations for transactionID: ${duplicateID}. This should not happen.`); |
There was a problem hiding this comment.
Please move the 2 variables to the 2nd param
There was a problem hiding this comment.
Why did you resolve this? I don't see the code was udpated
There was a problem hiding this comment.
Sorry about that I updated the code.
src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx
Outdated
Show resolved
Hide resolved
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 9.1.89-1 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.89-21 🚀
|
| // If the amount, currency or date have been modified, we remove the duplicate violations since they would be out of date as the transaction has changed | ||
| const optimisticViolations = | ||
| hasModifiedAmount || hasModifiedDate || hasModifiedCurrency | ||
| ? currentTransactionViolations.filter((violation) => violation.name !== CONST.VIOLATIONS.DUPLICATED_TRANSACTION) | ||
| : currentTransactionViolations; |
There was a problem hiding this comment.
There was missing case of showing double violations when disabled category is removed.
More details: #75364 (comment)
Explanation of Change
Implement a new function called
updateDuplicatesTransactionsViolationsto update the duplicate transaction violations of the transaction's duplicates when a transaction's amount, currency, and date are changed.Fixed Issues
$ #63671
PROPOSAL: #63671 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android.-.Native.mov
Android: mWeb Chrome
Android.-.mWeb.copy.mov
iOS: Native
iOS.-.Native.mp4
iOS: mWeb Safari
iOS.-.mWeb.mp4
MacOS: Chrome / Safari
macOS.-.Chrome.mov
MacOS: Desktop
macOS.-.Desktop.mov