Skip to content

[HOLD for payment 2024-10-14] [$250] [Dupe detection] Use new ResolveDuplicates when approver is resolving duplicates #48416

@pecanoro

Description

@pecanoro

Part of the Duplicate Detection project

Main issue: https://github.com/Expensify/Expensify/issues/411008
Project: Dupe detection

Feature Description

image

Right now, we always call MergeTransactions when resolving duplicates and click Confirm at the last page of resolving duplicates. However, we need to call a new command called ResolveDuplicates when an approver or admin (basically anyone but the submitter) is the person resolving the duplicates. The behaviour (so we can create the proper optimistic actions) should be as follows:

  • ResolveDuplicates API endpoint needs the following parameters:
            'authToken' => $authToken,
            'transactionIDToKeep' => $transactionIDToKeep,
            'transactionIDList' => $transactionIDList,
            'created' => $created,
            'merchant' => $merchant,
            'amount' => $amount,
            'currency' => $currency,
            'category' => $category,
            'comment' => $comment,
            'billable' => $billable,
            'reimbursable' => $reimbursable,
            'tag' => $tag,
            'optimisticReportActionID' => $optimisticReportActionID,
            'reportActionIDList' => $reportActionIDList,

This command will update the transaction to match the fields we chose during the flow. It should already be doing this.

  • It won't delete the rest of the transactions in transactionIDList but it will HOLD them by adding the hold NVP to it and will add the corresponding HOLD actions to each of them.
  • It will add a DISMISSEDVIOLATION action to the transactionIDToKeep
  • It will dismiss the violation by adding the corresponding transaction NVP for all transactions.

Main issue: https://github.com/Expensify/Expensify/issues/411008

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011781060ec2a6c428
  • Upwork Job ID: 1830626997874011636
  • Last Price Increase: 2024-09-02
  • Automatic offers:
    • nkdengineer | Contributor | 103792699
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @parasharrajat

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions