Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.43k stars 2.8k forks source link

[Hold for payment 2024-07-31] [Dupe Detection] Merge Duplicates - Confirm Page #39810

Closed pecanoro closed 1 month ago

pecanoro commented 6 months ago

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

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": ...",
            …
    }
  ]
}

Confirm Page

Our last confirm page will show a similar non-editable version of MoneyRequestView:

API.write('MergeDuplicates',
{
    transactionID,  // transaction to keep
    transactionIDs, // transactions to delete
       created,
       merchant,
       ...
}:

Some notes about the above request:

Issue OwnerCurrent Issue Owner: @kubabutkiewicz
melvin-bot[bot] commented 6 months ago

Triggered auto assignment to @sakluger (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details.

pecanoro commented 5 months ago

Callstack will be taking this series of tasks

kubabutkiewicz commented 5 months ago

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

kubabutkiewicz commented 5 months ago

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

pecanoro commented 5 months ago

In progress!

pecanoro commented 4 months ago

In progress!

pecanoro commented 4 months ago

WIP!

pecanoro commented 4 months ago

WIP!

melvin-bot[bot] commented 3 months ago

This issue has not been updated in over 15 days. @pecanoro, @kubabutkiewicz eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

pecanoro commented 3 months ago

Still WIP!

parasharrajat commented 3 months ago

I would like to review this page as well given that I reviewed other two and has more context.

kubabutkiewicz commented 2 months ago

@parasharrajat @pecanoro @JmillsExpensify PR is ready to review 😄

trjExpensify commented 2 months ago

Did the automation not run here? Seems like it hit prod 3 days ago: https://github.com/Expensify/App/pull/42571#issuecomment-2244525280

pecanoro commented 2 months ago

Hmm, yes, I think it failed

JmillsExpensify commented 2 months ago

cc @sakluger this is ready for payment soon.

sakluger commented 1 month ago

Sorry, everyone, I just noticed that this issue slipped through the cracks.

Summarizing payment on this issue:

Contributor: @kubabutkiewicz $250 - contractor, no payment required Contributor+: @parasharrajat $250, please request on Newdot

@parasharrajat do we need any regression tests for this one? Maybe something similar to the tests laid out in the PR?

parasharrajat commented 1 month ago

Regression Test Steps

  1. Create some expanses which are duplicates
  2. Go to one of expenses which are duplicates and click Review duplicates button
  3. Next click on one of the Keep this one button
  4. Now if there are some discrepancies between expenses you should be navigated to screen to review those discrepancies
  5. When there are no discrepancies you will be navigated to confirm screen.
  6. Verify that fields on confirmation screen are disabled.
  7. Verify that fields which you selected during review are the same which are on confirmation
  8. Click Confirm and observe that duplicate is resolved.

Do you agree 👍 or 👎 ?

sakluger commented 1 month ago

Thanks! Those steps are pretty good, I edited them to be a bit more specific.

  1. Create two expenses with duplicate expense details (merchant/date/amount), but different categories and descriptions
  2. Go to one of the duplicate expenses and click the "Review duplicates" button
  3. Click the "Keep this one" button for either copy of the expense
  4. Verify that you are taken to a new "Review duplicates" screen showing both categories
  5. Select one of the categories
  6. Verify that you are taken to a new "Review duplicates" screen showing both expense descriptions
  7. Select one of the descriptions
  8. Verify that you are taken to the "Confirm the details you're keeping" screen, that it shows the same category and description that you selected on the previous two screens, and that all fields are disabled
  9. Click Confirm and verify that the duplicate violation is gone
parasharrajat commented 1 month ago

Payment requested as per https://github.com/Expensify/App/issues/39810#issuecomment-2278360808

JmillsExpensify commented 1 month ago

$250 approved for @parasharrajat