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-10-29] [$250] [Dupe Detection] Unable to resolve duplicates on one-expense reporrts #49793

Closed
6 tasks done
m-natarajan opened this issue Sep 26, 2024 · 39 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Sep 26, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 26, 2024
Copy link

melvin-bot bot commented Sep 26, 2024

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.

@daledah
Copy link
Contributor

daledah commented Sep 26, 2024

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

@pecanoro pecanoro self-assigned this Sep 26, 2024
@dannymcclain
Copy link
Contributor

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

cc @JmillsExpensify @Expensify/design

@pecanoro pecanoro added the External Added to denote the issue can be worked on by a contributor label Sep 26, 2024
@melvin-bot melvin-bot bot changed the title Unable to resolve duplicates on one-expense reporrts [$250] Unable to resolve duplicates on one-expense reporrts Sep 26, 2024
Copy link

melvin-bot bot commented Sep 26, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021839321413603387914

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 26, 2024
Copy link

melvin-bot bot commented Sep 26, 2024

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

@JmillsExpensify
Copy link

Nice, I like that idea!

@daledah
Copy link
Contributor

daledah commented Sep 26, 2024

Updated proposal to fit with the new design

@dubielzyk-expensify
Copy link
Contributor

Same. Looks good to me

@shubham1206agra
Copy link
Contributor

Am I missing something or one expense should auto resolve duplicates? What are we marking duplicate against?

@pecanoro
Copy link
Contributor

@shubham1206agra The duplicates might be in a different report

@sobitneupane
Copy link
Contributor

sobitneupane commented Sep 30, 2024

Thanks for the proposal @daledah

We should remove canUseDupeDetection check in

I am not sure how is the change related to this issue. Dupe Detection is behind beta and the function is serving the purpose.

Can you please add more details to the 2nd point in your proposal.

@daledah
Copy link
Contributor

daledah commented Sep 30, 2024

@sobitneupane Thanks for your feedback, I updated the proposal to add more details and video result

@dylanexpensify
Copy link
Contributor

@sobitneupane thoughts now?

@sobitneupane
Copy link
Contributor

Thanks for the proposal @daledah

We would prefer not to display the 'Resolve Duplicate' button in the Expense Report that contains several "batched" expenses, as shown in the Result section of your proposal.

Screenshot 2024-10-01 at 15 22 46

Currently, we already display the 'Resolve Duplicate' button within a transaction for Expense Report that contains several "batched" expenses. However, when there is only one expense, the button is not shown. The only page where we would like to add the 'Resolve Duplicate' button is:

Screenshot 2024-10-01 at 15 20 40

Expected UI: #49793 (comment)

@sobitneupane
Copy link
Contributor

@dannymcclain Should we use the text "Review duplicates" instead of "Resolve duplicate", since that is the term currently being used? #49793 (comment)

Screenshot 2024-10-01 at 15 42 00

@dannymcclain
Copy link
Contributor

Should we use the text "Review duplicates" instead of "Resolve duplicate", since that is the term currently being used?

This is a good question for @JmillsExpensify — I'm tempted to say let's use the language we already have, but I'm not 100% sure.

@pecanoro
Copy link
Contributor

pecanoro commented Oct 1, 2024

Yeah, let's keep the language that we already have, no need to change it for now.

@dylanexpensify
Copy link
Contributor

@daledah when can we expect updated proposal?

@daledah
Copy link
Contributor

daledah commented Oct 2, 2024

@dylanexpensify @sobitneupane
Sorry, I misunderstood the requirement.

I updated the proposal. Pls let me know what your though?

@sobitneupane
Copy link
Contributor

Thanks for the update, @daledah.

The proposal from @daledah looks good to me. However, we still need some styling changes to achieve the requested UI.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Oct 2, 2024

Current assignee @pecanoro is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@pecanoro
Copy link
Contributor

pecanoro commented Oct 2, 2024

Assigning @daledah to the issue!

@dylanexpensify dylanexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Oct 15, 2024
Copy link

melvin-bot bot commented Oct 15, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 15, 2024
@dylanexpensify
Copy link
Contributor

Reassigning as I head to parental leave next week! Thanks Matt!

Copy link

melvin-bot bot commented Oct 20, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Oct 22, 2024
@melvin-bot melvin-bot bot changed the title [$250] [Dupe Detection] Unable to resolve duplicates on one-expense reporrts [HOLD for payment 2024-10-29] [$250] [Dupe Detection] Unable to resolve duplicates on one-expense reporrts Oct 22, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

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

Copy link

melvin-bot bot commented Oct 22, 2024

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

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

  • @sobitneupane requires payment through NewDot Manual Requests
  • @daledah requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Oct 22, 2024

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:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 28, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2024
Copy link

melvin-bot bot commented Oct 31, 2024

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

Copy link

melvin-bot bot commented Nov 4, 2024

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

@mallenexpensify
Copy link
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

@daledah
Copy link
Contributor

daledah commented Nov 6, 2024

@mallenexpensify Many thanks, job accepted

@sobitneupane
Copy link
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 👎

@sobitneupane
Copy link
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)

@mallenexpensify
Copy link
Contributor

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

Test case created

Thanks!

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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

10 participants