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

[$250] [Dupe Detection] Unable to resolve duplicates on one-expense reporrts #49793

Open
6 tasks done
m-natarajan opened this issue Sep 26, 2024 · 27 comments
Open
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

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 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
@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!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 2, 2024
Copy link

melvin-bot bot commented Oct 2, 2024

📣 @daledah You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 3, 2024
@daledah
Copy link
Contributor

daledah commented Oct 3, 2024

@sobitneupane PR is ready.

@JmillsExpensify
Copy link

Awesome, thanks for the quick work on this one!

@pecanoro pecanoro changed the title [$250] Unable to resolve duplicates on one-expense reporrts [$250] [Dupe Detection] Unable to resolve duplicates on one-expense reporrts Oct 11, 2024
@dylanexpensify dylanexpensify removed their assignment Oct 15, 2024
@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

10 participants