App icon indicating copy to clipboard operation
App copied to clipboard

Expense - "Unapprove" option is available in report with deleted expense that has comments

Open lanitochka17 opened this issue 1 year ago • 14 comments

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: 9.0.5-4 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 Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. [User A] Submit two expenses to User B
  3. [User A] Go to transaction thread of one of the expenses, and add some comments
  4. [User A] Delete the expense that has comments
  5. [User B] Go to DM with User A
  6. {User B] Click on the expense preview
  7. [User B] Pay the report
  8. [User B] Go to the report that has comments (expense deleted)
  9. [User B] Click on the report header

Expected Result:

"Unapprove" option should not appear since the expense is deleted, only comments are left in the report

Actual Result:

"Unapprove" options shows up even though the expense is deleted

Workaround:

Unknown

Platforms:

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

  • [x] Android: Native
  • [x] Android: mWeb Chrome
  • [x] iOS: Native
  • [x] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [x] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/2e55eb7b-9be4-46a6-94c3-4a5c46cc777e

View all open jobs on GitHub

lanitochka17 avatar Jul 08 '24 17:07 lanitochka17

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

melvin-bot[bot] avatar Jul 08 '24 17:07 melvin-bot[bot]

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

github-actions[bot] avatar Jul 08 '24 17:07 github-actions[bot]

@blimpich FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

lanitochka17 avatar Jul 08 '24 17:07 lanitochka17

We think that this bug might be related to #wave-collect - Release 1

lanitochka17 avatar Jul 08 '24 17:07 lanitochka17

Looking into this now

blimpich avatar Jul 08 '24 18:07 blimpich

Think I know what caused this, testing locally.

blimpich avatar Jul 08 '24 20:07 blimpich

Having trouble repro-ing locally.

blimpich avatar Jul 08 '24 20:07 blimpich

Was able to repro and confirm it stems from this PR

cc: @rushatgabhane @Beamanator

blimpich avatar Jul 08 '24 20:07 blimpich

Demoting because this is edge case.

blimpich avatar Jul 08 '24 20:07 blimpich

@Beamanator @rushatgabhane assigned both of you as this is follow up for this PR you worked on recently.

blimpich avatar Jul 08 '24 21:07 blimpich

cool cool we have to check for deleted report here

https://github.com/Expensify/App/pull/44229/files#diff-409b0e2fb439856e9897b808014031ce244a427d116ed30f37a2e0117599adc4R202

rushatgabhane avatar Jul 08 '24 21:07 rushatgabhane

@rushatgabhane I don't think we should be showing Unapprove at the expense level to begin with.

garrettmknight avatar Jul 09 '24 09:07 garrettmknight

True, I'm removing the Unapprove button from showing at the expense level in https://github.com/Expensify/App/pull/45049, as that also fixes https://github.com/Expensify/App/issues/44969

Beamanator avatar Jul 09 '24 10:07 Beamanator

Fix merged & CPing

Beamanator avatar Jul 09 '24 10:07 Beamanator

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

melvin-bot[bot] avatar Jul 12 '24 18:07 melvin-bot[bot]

This should be fixed already

Beamanator avatar Jul 12 '24 19:07 Beamanator