feat: surfacing potential duplicates#40153
Conversation
…at-surface-potential-duplicates
…at-surface-potential-duplicates
|
@gijoe0295 Please type include your test steps as text in the OP instead of using an image. |
|
@akinwale Updated test steps and resolved conflicts. |
Co-authored-by: Rocio Perez-Cano <pecanoro@users.noreply.github.com>
…hub.com/gijoe0295/App into gijoe/feat-surface-potential-duplicates
|
In the logs, I can't find any trace of computing the violations at all or opening the transaction report, that's why I am so confused. @akinwale Can you try again and give me the transactionIDs and the reportID? I am going to check again |
@pecanoro Do I have to create completely new transactions or would the existing transactions work? |
|
@akinwale You do need to create new transactions as per my understanding. |
|
@gijoe0295 Please add a note to your test step that the user needs to open the transaction thread before the violations are actually displayed. |
Reviewer Checklist
Screenshots/VideosAndroid: Native40153-android-native.mp4Android: mWeb Chrome40153-android-chrome.mp4iOS: Native40153-ios-native.mp4iOS: mWeb Safari40153-ios-safari.mp4MacOS: Chrome / Safari40153-web.mp4MacOS: Desktop40153-desktop.mp4 |
|
Wahoo, progress! @gijoe0295 we have a bunch of conflicts here now. Can you address them? |
…at-surface-potential-duplicates
|
Done! |
pecanoro
left a comment
There was a problem hiding this comment.
Looks great! I am going to test it really quick and I will merge
|
Seems to be working well, merging! |
|
✋ 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 production by https://github.com/luacmartins in version: 1.4.81-11 🚀
|
|
Just letting you know the PR here had a minor regression. Full details about the regression is posted in the CP PR here. |
|
|
||
| return !!transaction.comment?.hold; | ||
| return !!transaction.comment?.hold || isDuplicate(transaction.transactionID, true); | ||
| } |
There was a problem hiding this comment.
add isDuplicate to condition here cause normal "Unhold" option shows for duplicated expense. and we handled it here #44892
|
This case was missed during the feature implementation. For one-expense reports, the Review Duplicate button is not displayed. |
| const didDismissedViolation = | ||
| allTransactions?.[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`]?.comment?.dismissedViolations?.duplicatedTransaction?.[currentUserEmail] === `${currentUserAccountID}`; |
There was a problem hiding this comment.
Coming from #66181,
From the OP "Feature Description" screenshots, BE is returning the duplicatedTransaction value as a [currentUserEmail]: timestamp, but in the PR it was implemented as [currentUserEmail]: currentUserAccountID.
1711660500 below is a timestamp (Thursday, March 28, 2024 9:15:00 PM).
Details
This PR implements UI for duplicated transaction violations.
Fixed Issues
$ #32607
PROPOSAL: #32607 (comment)
Tests
Note
Enable
Use Staging Serverif testing on devThe Collect workspace has Expenses >> Expense Violations enabled
Cash · Duplicate · Holdon topHOLDbanner is added with the following copyThis expense has the same details as another one. Review the duplicates to remove the hold.Review duplicatesis in the request header (pressing it does nothing)Offline tests
NA
QA Steps
Note
The Collect workspace has Expenses >> Expense Violations enabled
Cash · Duplicate · Holdon topHOLDbanner is added with the following copyThis expense has the same details as another one. Review the duplicates to remove the hold.Review duplicatesis in the request header (pressing it does nothing)PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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: mWeb Chrome
<--- add screenshots or videos here -->
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop