Skip to content

[Due for payment 2025-04-25] [$250] Expense - When an expense is deleted offline, only the email of the submitter is shown #59618

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

Closed
2 of 8 tasks
nlemma opened this issue Apr 3, 2025 · 15 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

@nlemma
Copy link

nlemma commented Apr 3, 2025

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: v9.1.22-10
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 13.6/Chrome
App Component: Money Requests

Action Performed:

Pre condition: Sign in with an Expensifail account

  1. Go to Workspace Chat > Click the Plus (+) Sign > Select Manually.
  2. Enter Amount, add Merchant, and Submit.
  3. Switch to Offline Mode > Delete the expense.
  4. Notice that only the email of the expense submitter is displayed.

Expected Result:

The expense should either be fully removed or indicate which line item was erased.

Actual Result:

When the expense is deleted offline, only the submitter’s email is displayed at the end.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6791432_1743702192261.Screen_Recording_2025-04-03_at_10.33.15_AM.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021909739315985444002
  • Upwork Job ID: 1909739315985444002
  • Last Price Increase: 2025-04-08
  • Automatic offers:
    • allgandalf | Reviewer | 106864301
    • daledah | Contributor | 106864302
Issue OwnerCurrent Issue Owner: @johncschuster
@nlemma nlemma added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 3, 2025
Copy link

melvin-bot bot commented Apr 3, 2025

Triggered auto assignment to @johncschuster (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 Apr 3, 2025

Proposal

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

Expense - When an expense is deleted offline, only the email of the submitter is shown

What is the root cause of that problem?

We don't cover case deleted expense in MoneyRequestReportPreview component

} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && canUseTableReportView) {
children = (
<MoneyRequestReportPreview
// eslint-disable-next-line @typescript-eslint/non-nullable-type-assertion-style
iouReportID={getIOUReportIDFromReportActionPreview(action) as string}
policyID={report?.policyID}
chatReportID={reportID}
action={action}
contextMenuAnchor={popoverAnchorRef.current}
isHovered={hovered}
isWhisper={isWhisper}
checkIfContextMenuActive={toggleContextMenuFromActiveReportAction}
onPaymentOptionsShow={() => setIsPaymentMethodPopoverActive(true)}
onPaymentOptionsHide={() => setIsPaymentMethodPopoverActive(false)}
/>
);

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

We should show the ReportPreview component in case deleted expense by updating this condition

   if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && canUseTableReportView && action.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE)
Image

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

@FitseTLT
Copy link
Contributor

FitseTLT commented Apr 3, 2025

Proposal

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

Expense - When an expense is deleted offline, only the email of the submitter is shown

What is the root cause of that problem?

We show pending delete report actions while offline

(reportAction) =>
(isOffline || isDeletedParentAction(reportAction) || reportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || reportAction.errors) &&
shouldReportActionBeVisible(reportAction, reportAction.reportActionID, canPerformWriteAction),

but after deleting the transaction list is empty so we don't display anything

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

For canUseTableReportView we should hide pending delete report previews

(reportAction) =>
(isOffline || isDeletedParentAction(reportAction) || reportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || reportAction.errors) &&
shouldReportActionBeVisible(reportAction, reportAction.reportActionID, canPerformWriteAction),

                    ((isOffline && !(canUseTableReportView && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW)) ||

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

n / a

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Apr 7, 2025
Copy link

melvin-bot bot commented Apr 7, 2025

@johncschuster Whoops! This issue is 2 days overdue. Let's get this updated quick!

@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label Apr 8, 2025
Copy link

melvin-bot bot commented Apr 8, 2025

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

@melvin-bot melvin-bot bot changed the title Expense - When an expense is deleted offline, only the email of the submitter is shown [$250] Expense - When an expense is deleted offline, only the email of the submitter is shown Apr 8, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 8, 2025
Copy link

melvin-bot bot commented Apr 8, 2025

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

@allgandalf
Copy link
Contributor

@daledah's proposal LGTM!

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 10, 2025

Triggered auto assignment to @MariaHCD, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 10, 2025
Copy link

melvin-bot bot commented Apr 10, 2025

📣 @allgandalf 🎉 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

Copy link

melvin-bot bot commented Apr 10, 2025

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

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Apr 14, 2025
@melvin-bot melvin-bot bot changed the title [$250] Expense - When an expense is deleted offline, only the email of the submitter is shown [Due for payment 2025-04-25] [$250] Expense - When an expense is deleted offline, only the email of the submitter is shown Apr 18, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 18, 2025
Copy link

melvin-bot bot commented Apr 18, 2025

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

Copy link

melvin-bot bot commented Apr 18, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.29-10 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 2025-04-25. 🎊

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

Copy link

melvin-bot bot commented Apr 18, 2025

@allgandalf @johncschuster @allgandalf 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]

@allgandalf
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: beb2c39#r155636892

  • [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: N/A

  • [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.

  • [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:

  1. Go to Workspace Chat > Click the Plus (+) Sign > Select Manually.
  2. Enter Amount, add Merchant, and Submit.
  3. Switch to Offline Mode > Delete the expense.

Verify that: The expense should either be fully indicated which line item was erased.

Do we agree 👍 or 👎

@johncschuster
Copy link
Contributor

johncschuster commented Apr 23, 2025

Payment Summary (to be issued after regression window has passed)

Contributor: @daledah paid $250 via Upwork
Contributor+: @allgandalf paid $250 via Upwork

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 25, 2025
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
Status: Done
Development

No branches or pull requests

6 participants