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-16] [$250] Expense - Add receipt modal disappears and then reappears after the receipt is deleted #50159

Closed
6 tasks done
lanitochka17 opened this issue Oct 3, 2024 · 19 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 3, 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.44-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+kh0110001@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Submit an expense with receipt to any user
  3. Go to transaction thread
  4. Click on the receipt
  5. Click 3-dot menu > Delete receipt
  6. Delete the receipt

Expected Result:

Add receipt modal will not disappear and reappear after the receipt is deleted

Actual Result:

Add receipt modal disappears and then reappears after the receipt is deleted

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

Add any screenshot/video evidence
Bug6623235_1727962475397.receipt.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021841875580285563023
  • Upwork Job ID: 1841875580285563023
  • Last Price Increase: 2024-10-03
Issue OwnerCurrent Issue Owner: @kadiealexander
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Oct 3, 2024
Copy link

melvin-bot bot commented Oct 3, 2024

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

Copy link
Contributor

github-actions bot commented Oct 3, 2024

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

@jasperhuangg
Copy link
Contributor

This is a super minor display bug where some UI disappears for a split second when some state fields change on the page, definitely doesn't need to be a blocker.

@jasperhuangg jasperhuangg added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Oct 3, 2024
@melvin-bot melvin-bot bot changed the title Expense - Add receipt modal disappears and then reappears after the receipt is deleted [$250] Expense - Add receipt modal disappears and then reappears after the receipt is deleted Oct 3, 2024
Copy link

melvin-bot bot commented Oct 3, 2024

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

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

melvin-bot bot commented Oct 3, 2024

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

Copy link

melvin-bot bot commented Oct 3, 2024

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

@jasperhuangg
Copy link
Contributor

I'm applying the necessary labels but leaving it you to decide whether this is something worth fixing @thienlnam

@Krishna2323
Copy link
Contributor

Krishna2323 commented Oct 3, 2024

Edited by proposal-police: This proposal was edited at 2024-10-03 16:38:52 UTC.

Offending PR #49633

Proposal


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

Expense - Add receipt modal disappears and then reappears after the receipt is deleted

What is the root cause of that problem?

  • When receipt is deleted, the delete pending action is applied to the empty view and the empty receipt view is not rendered.

{shouldShowReceiptEmptyState && (
<OfflineWithFeedback pendingAction={getPendingFieldAction('receipt')}>
<ReceiptEmptyState
hasError={hasErrors}
disabled={!canEditReceipt}
onPress={() =>
Navigation.navigate(
ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute(
CONST.IOU.ACTION.EDIT,
iouType,
transaction?.transactionID ?? '-1',
report?.reportID ?? '-1',
Navigation.getReportRHPActiveRoute(),
),
)
}
/>
</OfflineWithFeedback>
)}

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


  • We should only add the pending action if it is add.
<OfflineWithFeedback pendingAction={getPendingFieldAction('receipt') === 'add' ? getPendingFieldAction('receipt') : undefined}>
  • With add, we can also use update.
<OfflineWithFeedback pendingAction={getPendingFieldAction('receipt') !== 'delete' ? getPendingFieldAction('receipt') : undefined}>
  • I also think we need update ReceiptAudit pending action similarly. Or we can use transaction?.pendingAction for this.
    {shouldShowReceiptAudit && (
    <OfflineWithFeedback pendingAction={getPendingFieldAction('receipt')}>
    <ReceiptAudit
    notes={receiptViolations}
    shouldShowAuditResult={!!shouldShowAuditMessage}
    />
    </OfflineWithFeedback>
    )}

What alternative solutions did you explore? (Optional)

  • We can only apply the pending action when isOffline is true.
<OfflineWithFeedback pendingAction={isOffline ? getPendingFieldAction('receipt') : undefined}>

Result

@Nodebrute
Copy link
Contributor

offending pr #49633

@shubham1206agra
Copy link
Contributor

@nkdengineer @dukenv0307 Please fix this regression.

@Krishna2323
Copy link
Contributor

@shubham1206agra, this was marked external before I posted my proposal so I think my proposal is still valid.

@shubham1206agra
Copy link
Contributor

@Krishna2323 You will be paid partially if they uses your fix.

@nkdengineer
Copy link
Contributor

Will raise the PR soon.

@melvin-bot melvin-bot bot added the Weekly KSv2 label Oct 5, 2024
@nkdengineer
Copy link
Contributor

@dukenv0307 this PR is ready for review

@allgandalf
Copy link
Contributor

I will unassign myself since this was a regression from previous PR

@allgandalf allgandalf removed their assignment Oct 8, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 9, 2024
@melvin-bot melvin-bot bot changed the title [$250] Expense - Add receipt modal disappears and then reappears after the receipt is deleted [HOLD for payment 2024-10-16] [$250] Expense - Add receipt modal disappears and then reappears after the receipt is deleted Oct 9, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

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

Copy link

melvin-bot bot commented Oct 9, 2024

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

Copy link

melvin-bot bot commented Oct 9, 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:

  • [@thienlnam] The PR that introduced the bug has been identified. Link to the PR:
  • [@thienlnam] 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:
  • [@thienlnam] 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:
  • [@thienlnam] Determine if we should create a regression test for this bug.
  • [@thienlnam] 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.
  • [@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@kadiealexander
Copy link
Contributor

Closing as no one is due payment here.

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. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants