Skip to content

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

Closed

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

Activity

  1. changed the title [-]Use new ResolveDuplicates[/-] [+][Dupe detection] Use new ResolveDuplicates when approver is resolving duplicates[/+] on Sep 2, 2024
  2. pecanoro commented on Sep 2, 2024

    @pecanoro
    ContributorAuthor

    @parasharrajat I am assigning you as the C+ in this issue since you reviewed the main ones.

  3. added
    Bug
    on Sep 2, 2024
  4. parasharrajat commented on Sep 2, 2024

    @parasharrajat
    Member

    Sure

  5. melvin-bot commented on Sep 2, 2024

    @melvin-bot

    Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  6. added
    External
    and removed
    Daily
    on Sep 2, 2024
  7. changed the title [-][Dupe detection] Use new ResolveDuplicates when approver is resolving duplicates[/-] [+][$250] [Dupe detection] Use new ResolveDuplicates when approver is resolving duplicates[/+] on Sep 2, 2024
  8. melvin-bot commented on Sep 2, 2024

    @melvin-bot
  9. added
    Help Wanted
    on Sep 2, 2024
  10. melvin-bot commented on Sep 2, 2024

    @melvin-bot

    Current assignee @parasharrajat is eligible for the External assigner, not assigning anyone new.

  11. 53 remaining items

  12. changed the title [-][$250] [Dupe detection] Use new ResolveDuplicates when approver is resolving duplicates[/-] [+][HOLD for payment 2024-10-14] [$250] [Dupe detection] Use new ResolveDuplicates when approver is resolving duplicates[/+] on Oct 7, 2024
  13. melvin-bot commented on Oct 7, 2024

    @melvin-bot

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

  14. removed
    Reviewing
    on Oct 7, 2024
  15. melvin-bot commented on Oct 7, 2024

    @melvin-bot

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

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

  16. melvin-bot commented on Oct 7, 2024

    @melvin-bot

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

    • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
    • [@parasharrajat] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@parasharrajat] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@parasharrajat] Determine if we should create a regression test for this bug.
    • [@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. sonialiap commented on Oct 14, 2024

    @sonialiap
    Contributor

    Payment summary:

  18. added
    Daily
    and removed
    Weekly
    on Oct 14, 2024
  19. parasharrajat commented on Oct 14, 2024

    @parasharrajat
    Member

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

    • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR: New Feature
    • [@parasharrajat] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: New feature
    • [@parasharrajat] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: Not needed
    • [@parasharrajat] Determine if we should create a regression test for this bug. Yes
    • [@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

    Regression Test Steps

    1. [Employee] Submit two expenses that are duplicated
    2. [Admin] Go to the transaction thread of a transaction
    3. [Admin] Review the duplicate and chose any transaction to keep
    4. [Admin] Confirm to resolve the duplicate
    5. Verify that the transaction thread of the kept transaction has a dismiss violation action resolved the duplicate
    6. The preview of other duplicate transactions has hold message and the transaction thread has a hold action
    7. Click on back button browser
    8. Verify that the confirmation page doesn't appear

    Do you agree 👍 or 👎 ?

  20. added
    Daily
    and removed
    Daily
    on Oct 14, 2024
  21. parasharrajat commented on Dec 12, 2024

    @parasharrajat
    Member

    Payment requested as per #48416 (comment)

  22. JmillsExpensify commented on Dec 16, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @parasharrajat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions