Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.52k stars 2.87k forks source link

[HOLD for payment 2024-08-05] [$250] Dupe detect - Distance field is not disabled and not here page opens after changing distance #45833

Closed m-natarajan closed 2 months ago

m-natarajan commented 3 months ago

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.10-2 Reproducible in staging ?: Y Reproducible in production?: No new feature 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: applause internal team Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit two same distance expenses (same distance).
  4. Go to transactiont thread of any expense.
  5. Click Review duplicates.
  6. Click Keep this one.
  7. Proceed to confirmation page.
  8. Click on the distance field.
  9. Change the distance.
  10. Click Confirm.

Expected Result:

In Step 8, distance field should be disabled.

Actual Result:

In Step 8, distance field is not disabled. After changing the distance and confirming it, app opens not here page (Step 10).

Workaround:

unknown

Platforms:

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

Screenshots/Videos

https://github.com/user-attachments/assets/230a0043-2ce7-4bc6-9707-7deb03606442

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0184066b98a5cfeddb
  • Upwork Job ID: 1814753910382559620
  • Last Price Increase: 2024-07-23
  • Automatic offers:
    • c3024 | Reviewer | 103200665
Issue OwnerCurrent Issue Owner: @RachCHopkins
melvin-bot[bot] commented 3 months ago

Triggered auto assignment to @RachCHopkins (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[bot] commented 3 months ago

Triggered auto assignment to @iwiznia (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 3 months ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
mountiny commented 3 months ago

cc @pecanoro @JmillsExpensify @parasharrajat

melvin-bot[bot] commented 3 months ago

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

melvin-bot[bot] commented 3 months ago

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

melvin-bot[bot] commented 3 months ago

Upwork job price has been updated to $125

parasharrajat commented 3 months ago

This is an easy one.

mountiny commented 3 months ago

Making it external for half price as it seems quite niche

parasharrajat commented 3 months ago

Proposal

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

Distance field is not disabled and which opens not here page.

What is the root cause of that problem?

we are not blocking interactions for distance fields on MoneyRequestView component.

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

We just need to pass readonly prop to interactive prop on all distance related fields https://github.com/Expensify/App/blob/fa738c641e7d2b289850da7b4be11369c33b96d6/src/components/ReportActionItem/MoneyRequestView.tsx#L318

What alternative solutions did you explore? (Optional)

gijoe0295 commented 3 months ago

Proposal

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

In Step 8, distance field is not disabled.

What is the root cause of that problem?

readonly is not taken into account for distance field.

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

Add && readonly to distance field:

https://github.com/Expensify/App/blob/6a0b99e745aaa1549c7a45321946c914d095017b/src/components/ReportActionItem/MoneyRequestView.tsx#L321

parasharrajat commented 3 months ago

Ah damn, I didn't find the template in Time.

etCoderDysto commented 3 months ago

Proposal

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

Distance field is not disabled and not here page opens after changing distance

What is the root cause of that problem?

We are not checking readonly here https://github.com/Expensify/App/blob/fa738c641e7d2b289850da7b4be11369c33b96d6/src/components/ReportActionItem/MoneyRequestView.tsx#L318-L322 and here https://github.com/Expensify/App/blob/fa738c641e7d2b289850da7b4be11369c33b96d6/src/components/ReportActionItem/MoneyRequestView.tsx#L345-L348

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

we should pass

 interactive={canEditDistance && !readonly}

What alternative solutions did you explore? (Optional)

mountiny commented 3 months ago

@parasharrajat since this is coming from PR you have reviewed, I think you are welcome to raise a fix

melvin-bot[bot] commented 3 months ago

📣 @c3024 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job

mountiny commented 3 months ago

@parasharrajat will you be able to raise a PR Monday morning latest? Thanks!

mountiny commented 3 months ago

Dupe detection is behind beta so we can remove the blocker

parasharrajat commented 3 months ago

I will have PR ready in few hours.

parasharrajat commented 3 months ago

@mountiny PR is created.

melvin-bot[bot] commented 3 months ago

Upwork job price has been updated to $250

melvin-bot[bot] commented 3 months ago

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

melvin-bot[bot] commented 3 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.13-4 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-05. :confetti_ball:

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

melvin-bot[bot] commented 3 months ago

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:

c3024 commented 2 months ago

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:

  • [x] [@c3024] The PR that introduced the bug has been identified. Link to the PR: This was not a bug introduced by a PR. It was known when working on the previous PR which did not include these changes.
  • [x] [@c3024] 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: NA
  • [x] [@c3024] 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: NA
  • [x] [@c3024] Determine if we should create a regression test for this bug. Yes
  • [x] [@c3024] 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 Proposal

  1. Go to a workspace chat
  2. Submit two identical distance requests (identical waypoints) to this workspace chat.
  3. Notice the review duplicate button pops up.
  4. Click Review Duplicate.
  5. Click Keep this one for any one transaction on the review page.
  6. Go through the flow till Confirm page.
  7. Click Distance field on Confirm page.
  8. Verify that the Distance field is not editable and no edit page opens up.
mountiny commented 2 months ago

I believe the summary is to $250 to @parasharrajat and to @c3024

melvin-bot[bot] commented 2 months ago

@parasharrajat, @RachCHopkins, @mountiny, @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!

RachCHopkins commented 2 months ago

Payment Summary:

Contributor: @c3024 paid $250 via Upwork

Contributor+: @parasharrajat due $250 via NewDot

Upwork job here

RachCHopkins commented 2 months ago

Contributor has been paid, the contract has been completed, and the Upwork post has been closed.

parasharrajat commented 2 months ago

Payment requested as per https://github.com/Expensify/App/issues/45833#issuecomment-2276702705

JmillsExpensify commented 2 months ago

$250 approved for @parasharrajat