Skip to content

[Due for payment 2025-04-18] Expense - "Review" button is still displayed for admin and employee after expense is paid #59912

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
6 of 8 tasks
IuliiaHerets opened this issue Apr 9, 2025 · 20 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Apr 9, 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: 9.1.25-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
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 15.3 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Log in with Gmail accounts.
  • Admin and employees are in the same workspace.
  • "Members must categorize all expenses" toggle is enabled in Categories settings.
  1. Go to staging.new.expensify.com
  2. [Employee] Submit an expense without category to the workspace chat.
  3. [Employee] Go to expense report.
  4. [Employee] Click More > Submit.
  5. [Admin] Go to workspace chat with employee.
  6. [Admin] Go to expense report.
  7. [Admin] Click Approve.
  8. [Admin] Click Pay elsewhere.
  9. [Admin & Employee] Go back to main workspace chat.

Expected Result:

"Review" button will not be displayed for admin and employee after expense is paid.

Actual Result:

"Review" button is still displayed for admin and employee after expense is paid.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6797005_1744193133926.20250409_175800.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @RachCHopkins
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment labels Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

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.

Copy link

melvin-bot bot commented Apr 9, 2025

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 9, 2025
Copy link
Contributor

github-actions bot commented Apr 9, 2025

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

@jnowakow
Copy link
Contributor

jnowakow commented Apr 9, 2025

I'm not able to reproduce it:

Image

@nkdengineer
Copy link
Contributor

@jnowakow I can reproduce this. The violation will not be cleared after we have paid the expense. I think we should update the canReview function with adding !isSettled(report)

return hasViolations && (isSubmitter || isApprover) && areWorkflowsEnabled;

Image

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Copy link

melvin-bot bot commented Apr 9, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@dangrous
Copy link
Contributor

dangrous commented Apr 9, 2025

Looks like it should be fixed by the revert of #58084, will confirm once on staging.

@luacmartins
Copy link
Contributor

FYI we reverted the original offending PR

@luacmartins luacmartins assigned luacmartins and jnowakow and unassigned dangrous Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Apr 9, 2025
@jasperhuangg
Copy link
Contributor

Confirmed not reproducible, closing

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 11, 2025
@melvin-bot melvin-bot bot changed the title Expense - "Review" button is still displayed for admin and employee after expense is paid [Due for payment 2025-04-18] Expense - "Review" button is still displayed for admin and employee after expense is paid Apr 11, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 11, 2025
Copy link

melvin-bot bot commented Apr 11, 2025

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

Copy link

melvin-bot bot commented Apr 11, 2025

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

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

  • @jnowakow does not require payment (Contractor)

Copy link

melvin-bot bot commented Apr 11, 2025

@luacmartins @RachCHopkins @jnowakow 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]

@SzymczakJ
Copy link
Contributor

Following question is going to only touch the report previews on reports/transactions that have violations

I've educated myself on the design doc and I see 3 cases here:

  1. We have a workspace connected to the integration and auto-sync is enabled, according to the doc:

In the case of approved, reimbursed, or closed reports with an accounting system connected via auto-sync, admins see: (...) View in the workspace chat preview and Reports (w/ and w/o violations)

So basically we never show review in this case(for admins, but I suppose it also applies to emplyees)

  1. We have a workspace connected to the integration and auto-sync is disabled, according to the doc:

In the case of approved, reimbursed, or closed reports with an accounting system connected via manual sync, the preferred exporter sees (...) Review in the workspace chat preview and Reports (w/ violations)

So we show review even though the report is reimbruised

  1. We have a workspace with no accounting:

This case lacks description in the doc, should we never show the Review, onve the report is reimbruised @luacmartins?

@luacmartins
Copy link
Contributor

luacmartins commented Apr 11, 2025

So basically we never show review in this case(for admins, but I suppose it also applies to emplyees)

Correct, but only if the report has been approved or reimbursed or closed.

So we show review even though the report is reimbruised

Also correct.

We have a workspace with no accounting:
This case lacks description in the doc, should we never show the Review, onve the report is reimbruised @luacmartins?

I think in this case we just default to showing the Review button, same as the case above. I'm confirming this one with the team though.

@luacmartins
Copy link
Contributor

luacmartins commented Apr 11, 2025

@SzymczakJ I talked to @JmillsExpensify 1:1 and we agreed on:

Always show Review if there's a violation up until the point the report has been reimbursed, at which point we just show View. So basically:

Auto-sync on

  • Review: If report is open, processing, or approved AND has violations
  • View: All other report states, whether violations or not.

Manual sync

  • Review: If report is open, processing, or approved AND has violations
  • Export to...: All other report states, whether violations or not.

@JmillsExpensify
Copy link

Great questions btw, thanks for helping us clear this up! I'll update the doc accordingly for clarity.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Apr 15, 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. Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants