Skip to content
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 2024-07-10] [HOLD for payment 2024-07-02] [Dupe Detection] Merge Duplicates - Review Page #39756

Closed
pecanoro opened this issue Apr 5, 2024 · 30 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering NewFeature Something to build that is a new item.

Comments

@pecanoro
Copy link
Contributor

pecanoro commented Apr 5, 2024

Part of the Merge Duplicates project

Main issue: https://github.com/Expensify/Expensify/issues/307591
Doc section: Surfacing Potential Duplicates
Project: [Wave: Collect Approvers] Dupe Detection

Part of a series of issues:

Feature Description

Context for ReviewDuplicates

  • Review page - /r/:threadReportID/duplicates/review
  • Merchant - /r/:threadReportID/duplicates/review/merchant
  • Category - /r/:threadReportID/duplicates/review/category
  • Tag - /r/:threadReportID/duplicates/review/tag
  • Description - /r/:threadReportID/duplicates/review/description
  • Confirm page - /r/:threadReportID/duplicates/confirm

image

All of these screens will exist in their own navigator so they can be pushed (and later popped off once complete) as a group.

All of this will use an Onyx form key of ONYXKEYS.FORMS.REVIEW_DUPLICATES_FORM so we can store the data selected by the user so far when resolving the duplicates. It also lets us keep track of which transaction to keep and which ones are duplicates when the user clicks on Keep this one.

This key will follow a structure like this:

{
  "review_duplicates_form_<transactionID>": [
    {
        "duplicates": {
<transactionID>: <transactionID>,
	...
  },
        "merchant": "...",
        "tag": ...",
	  "description": ...",
			…
    }
  ]
}

Review Page

On top of the page, we will add a button to “Keep All” duplicates. When calling onPress, we will call a new API endpoint called DismissViolation and navigate back. On oldDot, we use UpdateTransaction (which does a lot of stuff) but since we only have EditMoneyRequest here, it seems more appropriate to create a new endpoint to avoid breaking 1:1:1.

  • DismissViolation will receive a list of transactionIDs since we will have to update each one and the type of violation we are dismissing.

    • As optimistic data, it will update the transactions_* Onyx key to include dismissedViolations with the accountID of the person that dismissed it in the comment field.
    • As an example:

image-2024-04-08 10_51_27 803

- On failure, we will just remove the same data we added to the optimistic data.

In order to be able to get the duplicates and display them, we will:

  • Using Onyx, we can get the transaction for the threadReportID the same way as we do it for the EditRequestPage here.
  • Once we have that, we can get the transaction IDs of the duplicates using this transaction and listening to the transactions_* Onyx key.
  • Using Onyx we can fetch the transactions and with each one of those reports we can get the parentReportAction using the reportActions_ key.

To display the different duplicates on the page, we can make use of ReportActionItem which needs each one of the reportActionIDs so we can iterate and display them using the component.

Each one of ReportActionItem will generate a MoneyRequestAction and each one of this will make use MoneyRequestPreview to render the request. To show the button “Keep this one”:

  • MoneyRequestPreview will add a new button component at the end of the childContainer, similar to what we do in ReportPreview here to submit the report.

    • We can use the page's route prop to determine whether we need to show the button or hide it.
    • onButtonPressed: it should store the iouReport we want to keep in ONYXKEYS.FORMS.REVIEW_DUPLICATES_FORM and navigate to the page to start reviewing fields.
  • Preview should be navigable the same way as it is defined in MoneyRequestAction.

Manual Test Steps

TODO

Automated Tests

TODO

Issue OwnerCurrent Issue Owner: @JmillsExpensify
@pecanoro pecanoro self-assigned this Apr 5, 2024
@pecanoro pecanoro added NewFeature Something to build that is a new item. Weekly KSv2 labels Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

Copy link

melvin-bot bot commented Apr 8, 2024

⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️

@pecanoro
Copy link
Contributor Author

pecanoro commented Apr 17, 2024

Callstack will be taking this series of tasks

@melvin-bot melvin-bot bot removed the Overdue label Apr 17, 2024
@pecanoro pecanoro changed the title [HOLD][Dupe Detection] Merge Duplicates - Review Page [Dupe Detection] Merge Duplicates - Review Page Apr 17, 2024
@kubabutkiewicz
Copy link
Contributor

Hi, I'm Jakub from Callstack - expert contributor group - and I would like to take a look at this issue.

@kubabutkiewicz
Copy link
Contributor

Hi, just wanted to inform that I will be OOO from 29.04 to 05.05.

@melvin-bot melvin-bot bot added the Overdue label May 6, 2024
@pecanoro
Copy link
Contributor Author

pecanoro commented May 6, 2024

In progress!

@melvin-bot melvin-bot bot removed the Overdue label May 6, 2024
@melvin-bot melvin-bot bot added the Overdue label May 14, 2024
@pecanoro
Copy link
Contributor Author

In progress!

@pecanoro
Copy link
Contributor Author

WIP!

@melvin-bot melvin-bot bot removed the Overdue label May 24, 2024
@melvin-bot melvin-bot bot added the Overdue label Jun 3, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 25, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.1-19 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-07-02. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jun 25, 2024

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@kubabutkiewicz] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 2, 2024
Copy link

melvin-bot bot commented Jul 2, 2024

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jul 3, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-07-02] [Dupe Detection] Merge Duplicates - Review Page [HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [Dupe Detection] Merge Duplicates - Review Page Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 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-07-10. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jul 3, 2024

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@kubabutkiewicz] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

Copy link

melvin-bot bot commented Jul 10, 2024

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

@parasharrajat
Copy link
Member

@pecanoro could you please assign someone to add payment summary?

@pecanoro
Copy link
Contributor Author

@JmillsExpensify Can you handle payment for this issue for @parasharrajat since he reviewed the PR?

@pecanoro
Copy link
Contributor Author

@JmillsExpensify Friendly bump on the above 🤗

@pecanoro pecanoro added Daily KSv2 Overdue and removed Weekly KSv2 labels Jul 22, 2024
@JmillsExpensify
Copy link

Payment summary: $250 to @parasharrajat for PR review. We have a testing script being handed off to Applause now, so no need as part of this issue. @parasharrajat please submit a request via NewDot. Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Jul 26, 2024
@github-project-automation github-project-automation bot moved this from Release 2: Summer 2024 (Aug) to Done in [#whatsnext] #wave-collect Jul 26, 2024
@parasharrajat
Copy link
Member

Payment requested as per #39756 (comment)

@JmillsExpensify
Copy link

@mallenexpensify do you mind confirming my payment summary so that I can approve payment?

@mallenexpensify
Copy link
Contributor

Contributor+: @parasharrajat due $250 via NewDot

@JmillsExpensify
Copy link

$250 approved for @parasharrajat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering NewFeature Something to build that is a new item.
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants