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-01-03][$250] [Search v1.2] - Pay button does not appear when user owes money after deleting expense #52999

Closed
8 tasks done
IuliiaHerets opened this issue Nov 23, 2024 · 34 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 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 23, 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.66-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Email or phone of affected tester (no customers): applausetester+kh0911002@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. [User A] Send an expense ($10) to user B.
  3. [User B] Send an expense of higher amount ($20) to User A.
  4. [User B] Go to Search > Outstanding.
  5. [User B] Select the expense submitted in Step 3.
  6. [User B] Click dropdown button > Delete expense.
  7. [User B] Delete the expense.

Expected Result:

Pay button should appear next to the expense in Search for User B because now User B owes User A money.

Actual Result:

Pay button does not appear next to the expense in Search for User B unless the page is refreshed.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6673842_1732335839110.20241123_121641.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021860331085417429817
  • Upwork Job ID: 1860331085417429817
  • Last Price Increase: 2024-11-23
Issue OwnerCurrent Issue Owner: @isabelastisser
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment and removed Daily KSv2 labels Nov 23, 2024
Copy link

melvin-bot bot commented Nov 23, 2024

Triggered auto assignment to @isabelastisser (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 the Daily KSv2 label Nov 23, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Nov 23, 2024
Copy link

melvin-bot bot commented Nov 23, 2024

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

Copy link
Contributor

👋 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.

Copy link

melvin-bot bot commented Nov 23, 2024

💬 A slack conversation has been started in #expensify-open-source

@carlosmiceli carlosmiceli added the External Added to denote the issue can be worked on by a contributor label Nov 23, 2024
@melvin-bot melvin-bot bot changed the title Search - Pay button does not appear when user owes money after deleting expense [$250] Search - Pay button does not appear when user owes money after deleting expense Nov 23, 2024
Copy link

melvin-bot bot commented Nov 23, 2024

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

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

melvin-bot bot commented Nov 23, 2024

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

@carlosmiceli carlosmiceli removed DeployBlockerCash This issue or pull request should block deployment Help Wanted Apply this label when an issue is open to proposals by contributors labels Nov 23, 2024
@carlosmiceli
Copy link
Contributor

Removing DB label because it's very likely an easy fix and a bit of an edge case.

@cretadn22
Copy link
Contributor

@carlosmiceli @luacmartins

This is a BE bug. The BE doesn't return a new value for the action field

@carlosmiceli carlosmiceli added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor labels Nov 23, 2024
@carlosmiceli
Copy link
Contributor

@cretadn22 Gotcha, thanks for letting us know! @luacmartins can you take over this one since you have more context with Search?

@dominictb
Copy link
Contributor

dominictb commented Nov 25, 2024

I agree this is a BE issue with DeleteMoneyRequestOnSearch endpoint.

The root cause is when deleting the expense, the report now turns from having 2 to 1 expense only. But the DeleteMoneyRequestOnSearch does not update the transaction's isFromOneTransactionReport from false to true accordingly. It only clears the deleted transaction (set to null). Thus causes this check to fail and getAction returns VIEW for the above transaction (should be PAY).

Only Search returns the correct state so when we refresh the page, pay button appears.

// We don't need to run the logic if this is not a transaction or iou/expense report, so let's shortcircuit the logic for performance reasons
if (!ReportUtils.isMoneyRequestReport(report) || (isTransaction && !data[key].isFromOneTransactionReport)) {
return CONST.SEARCH.ACTION_TYPES.VIEW;
}

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 25, 2024

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

Copy link

melvin-bot bot commented Dec 13, 2024

@dominictb @isabelastisser @dominictb The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 20, 2024
Copy link

melvin-bot bot commented Dec 20, 2024

Payment Summary

Upwork Job

  • ROLE: @dominictb paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@isabelastisser)

  • 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/1860331085417429817/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@isabelastisser
Copy link
Contributor

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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:

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

Test:

Do we agree 👍 or 👎

@isabelastisser
Copy link
Contributor

@dominictb, can you please complete the checklist above and share your Upwork profile for payment? Thanks!

@dominictb
Copy link
Contributor

This was not fixed #52999 (comment).

@melvin-bot melvin-bot bot added the Overdue label Dec 24, 2024
Copy link

melvin-bot bot commented Dec 25, 2024

@luacmartins, @isabelastisser, @dominictb Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Dec 27, 2024

@luacmartins, @isabelastisser, @dominictb Huh... This is 4 days overdue. Who can take care of this?

@luacmartins luacmartins removed the Awaiting Payment Auto-added when associated PR is deployed to production label Dec 30, 2024
@luacmartins luacmartins changed the title [HOLD for payment 2024-12-20] [$250] [Search v1.2] - Pay button does not appear when user owes money after deleting expense [$250] [Search v1.2] - Pay button does not appear when user owes money after deleting expense Dec 30, 2024
@luacmartins
Copy link
Contributor

I'll work on a new fix this week.

@melvin-bot melvin-bot bot removed the Overdue label Dec 30, 2024
@luacmartins
Copy link
Contributor

BE PR in review

@luacmartins luacmartins added the Reviewing Has a PR in review label Dec 31, 2024
@luacmartins
Copy link
Contributor

PR merged, should be deployed today

@luacmartins
Copy link
Contributor

luacmartins commented Jan 3, 2025

This is fixed in staging. @isabelastisser I'll keep the issue open to process payment to @dominictb since they reviewed this PR, although it was reverted due to a regression.

@luacmartins luacmartins changed the title [$250] [Search v1.2] - Pay button does not appear when user owes money after deleting expense [HOLD for payment 2024-01-10][$250] [Search v1.2] - Pay button does not appear when user owes money after deleting expense Jan 3, 2025
@luacmartins luacmartins changed the title [HOLD for payment 2024-01-10][$250] [Search v1.2] - Pay button does not appear when user owes money after deleting expense [HOLD for payment 2024-01-03][$250] [Search v1.2] - Pay button does not appear when user owes money after deleting expense Jan 3, 2025
@luacmartins luacmartins added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Jan 3, 2025
@melvin-bot melvin-bot bot added the Overdue label Jan 6, 2025
@isabelastisser
Copy link
Contributor

@carlosmiceli, thanks for the heads up! @dominictb, does it mean that your PR was not used to fix this issue? Can you please clarify if payment is still required here? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Jan 6, 2025
@dominictb
Copy link
Contributor

@isabelastisser I helped reviewing #53722 but it then was reverted and decided to fix in the BE. So no checklist is needed and payment for me is required.

@isabelastisser
Copy link
Contributor

Got it, @dominictb! Thanks for the context. I will process the payment in Upwork, can you please share your Upwork profile?

@dominictb
Copy link
Contributor

@isabelastisser
Copy link
Contributor

@dominictb, I sent you the offer in Upwork now. All set!

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 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

6 participants