Skip to content

[HOLD for payment 2024-10-29] [$250] [Dupe Detection] Unable to resolve duplicates on one-expense reporrts #49793

Closed

Description

@m-natarajan

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.40-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @JmillsExpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1727339112704349

Action Performed:

  1. Create a new workspace, upgrade to Control
  2. Make sure you’re on the duplicate detection beta
  3. Enabled delayed submission with a weekly frequency. Enable approvals (with you as the approver)
  4. Have user a submit a report, with the merchant McDonalds for $50. Approve the report
  5. Have the user create another expense report for the same merchant and amount (McDonalds and $50)
  6. Have the user submit the report

Expected Result:

The approver is able to resolve a duplicate

Actual Result:

The approver is unable to resolve the duplicate, as no resolve duplicate button appears

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

CleanShot 2024-09-26 at 10 21 23@2x

Snip - (4) New Expensify - Google Chrome

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021839321413603387914
  • Upwork Job ID: 1839321413603387914
  • Last Price Increase: 2024-09-26
Issue OwnerCurrent Issue Owner: @sobitneupane

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 26, 2024
  2. melvin-bot commented on Sep 26, 2024

    @melvin-bot

    Triggered auto assignment to @dylanexpensify (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.

  3. daledah commented on Sep 26, 2024

    @daledah
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-09-26 15:28:39 UTC.

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    The approver is unable to resolve the duplicate, as no resolve duplicate button appears

    What is the root cause of that problem?

    New feature

    What changes do you think we should make in order to solve the problem?

    In MoneyReportHeader use isDuplicate to detect the duplicated transaction same as what we did in MoneyRequestHeader

    then show the Review duplicates button in here

        const isDuplicate = TransactionUtils.isDuplicate(transaction?.transactionID ?? '');
    
    ...
    
    {isDuplicate && !shouldUseNarrowLayout && (
                            <Button
                                success
                                text={translate('iou.reviewDuplicates')}
                                style={[styles.p0, styles.ml2]}
                                onPress={() => {
                                    Navigation.navigate(ROUTES.TRANSACTION_DUPLICATE_REVIEW_PAGE.getRoute(transactionThreadReport?.reportID ?? '', Navigation.getReportRHPActiveRoute()));
                                }}
                            />
                        )}
    
    ...
    {isDuplicate && shouldUseNarrowLayout && (
                        <View style={[styles.ph5, styles.pb3]}>
                            <Button
                                success
                                text={translate('iou.reviewDuplicates')}
                                style={[styles.w100, styles.pr0]}
                                onPress={() => {
                                    Navigation.navigate(ROUTES.TRANSACTION_DUPLICATE_REVIEW_PAGE.getRoute(transactionThreadReport?.reportID ?? '', Navigation.getReportRHPActiveRoute()));
                                }}
                            />
                        </View>
                    )}
    

    We should add the marginRight if there's at least one button on the right side

    What alternative solutions did you explore? (Optional)

    Result

    Screen.Recording.2024-10-02.at.10.21.36.mov
  4. self-assigned this
    on Sep 26, 2024
  5. dannymcclain commented on Sep 26, 2024

    @dannymcclain
    Contributor

    One way we could handle this is by adding a Resolve duplicates button to the header, like so:
    image

    cc @JmillsExpensify @Expensify/design

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 26, 2024
  7. changed the title [-]Unable to resolve duplicates on one-expense reporrts[/-] [+][$250] Unable to resolve duplicates on one-expense reporrts[/+] on Sep 26, 2024
  8. melvin-bot commented on Sep 26, 2024

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 26, 2024
  10. melvin-bot commented on Sep 26, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

  11. JmillsExpensify commented on Sep 26, 2024

    @JmillsExpensify
    Contributor

    Nice, I like that idea!

  12. daledah commented on Sep 26, 2024

    @daledah
    Contributor

    Updated proposal to fit with the new design

  13. 40 remaining items

  14. melvin-bot commented on Oct 22, 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:

    • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
    • [@sobitneupane] 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:
    • [@sobitneupane] 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:
    • [@sobitneupane] Determine if we should create a regression test for this bug.
    • [@sobitneupane] 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.
    • [@mallenexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. melvin-bot commented on Oct 29, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1839321413603387914/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  16. melvin-bot commented on Oct 31, 2024

    @melvin-bot

    @pecanoro, @mallenexpensify, @sobitneupane, @daledah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  17. melvin-bot commented on Nov 4, 2024

    @melvin-bot

    @pecanoro, @mallenexpensify, @sobitneupane, @daledah Still overdue 6 days?! Let's take care of this!

  18. mallenexpensify commented on Nov 5, 2024

    @mallenexpensify
    Contributor

    @daledah , can you please accept the job and reply here once you have?
    https://www.upwork.com/jobs/~021853927916382654201

    @sobitneupane , plz fill out the BZ checklist above, I imagine we want a test case for this

  19. daledah commented on Nov 6, 2024

    @daledah
    Contributor

    @mallenexpensify Many thanks, job accepted

  20. sobitneupane commented on Nov 6, 2024

    @sobitneupane
    Contributor

    Regression Test Proposal

    1. Create an expense report and submit it in a control workspace.
    2. Create another report with the same amount and merchant as step 1.
    3. Open the expense report submitted in step 2
    4. Verify that: "Review duplicates" button appears.

    Do we agree 👍 or 👎

  21. sobitneupane commented on Nov 6, 2024

    @sobitneupane
    Contributor

    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:

    • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

    #40153

    • [@sobitneupane] 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:

    #40153 (comment)

    • [@sobitneupane] 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:
    • [@sobitneupane] Determine if we should create a regression test for this bug.

    Yes.

    • [@sobitneupane] 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.

    #49793 (comment)

  22. mallenexpensify commented on Nov 7, 2024

    @mallenexpensify
    Contributor

    Contributor: @daledah paid $250 via Upwork
    Contributor+: @sobitneupane owed $250 via NewDot

    Test case created

    Thanks!

  23. garrettmknight commented on Dec 12, 2024

    @garrettmknight
    Contributor

    $250 approved for @sobitneupane

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

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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions