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

[$250] Expense report-Submit & approve button not disappear until page refreshed #48463

Open
1 of 6 tasks
izarutskaya opened this issue Sep 3, 2024 · 75 comments
Open
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Sep 3, 2024

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.28.0
Reproducible in staging?: Y
Reproducible in production?: N
Found when validation PR: #48362
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Precondition: log into OD as an admin, create a control policy, enable workspace chats, select "Advanced Approvals", invite 3 members (non-admin): 2 approvers and 1 submitter, set the approval flow as submitter submits to approver 1

  1. Log into ND as submitter
  2. Navigate to the workspace chat
  3. Submit one manual expense
  4. Open the report and click on the "Submit" button
  5. As admin, change the the submitter's submitsTo to approver 2 in OD
  6. Log into ND as approver 1
  7. Opened the submitted report
  8. Click on the "Approve" button

Expected Result:

The 'Submit" button disappears immediately for the submitter (step 4) and the "Approve" button disappears for the approver (step 8)

Actual Result:

The "Submit" and "Approve" button do not disappear until the page is refreshed or it is clicked on the second time (the "Approve" button)

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

Bug6591339_1725333837619.Recording__737.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01efec68070b933fc3
  • Upwork Job ID: 1831071506567798044
  • Last Price Increase: 2024-10-29
  • Automatic offers:
    • nkdengineer | Contributor | 104649054
Issue OwnerCurrent Issue Owner:
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 3, 2024
Copy link

melvin-bot bot commented Sep 3, 2024

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

Copy link

melvin-bot bot commented Sep 3, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Sep 3, 2024
Copy link
Contributor

github-actions bot commented Sep 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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #wave-control

@izarutskaya
Copy link
Author

Production

Recording.739.mp4
Recording.2788.mp4

@srikarparsi
Copy link
Contributor

srikarparsi commented Sep 3, 2024

Looked into this and I think this might be a problem with manually submitting reports. I verified this by:

  1. Creating a workspace
  2. Setting the submit frequency to manual
  3. Creating an expense
  4. Submitting the expense
  5. Seeing the submit button re-appear

(First part of the video is from staging and the second is from production)

manualSubmitBug.mov

@srikarparsi
Copy link
Contributor

I don't think this is a backend bug because the SubmitReport response is the same on staging and production.

@srikarparsi
Copy link
Contributor

I think this could be a possible culprit

@situchan
Copy link
Contributor

situchan commented Sep 3, 2024

I think this could be a possible culprit

No, that PR didn't hit staging yet

@srikarparsi
Copy link
Contributor

Ah you're right thanks

@srikarparsi
Copy link
Contributor

Hm, I'm not able to reproduce this in the latest dev.

Screen.Recording.2024-09-03.at.4.33.44.PM.mov

@srikarparsi
Copy link
Contributor

Still debugging on dev but going to add the external label to see if we can speed things up

@srikarparsi srikarparsi added the External Added to denote the issue can be worked on by a contributor label Sep 3, 2024
@melvin-bot melvin-bot bot changed the title Expense report-Submit & approve button not disappear until page refreshed [$250] Expense report-Submit & approve button not disappear until page refreshed Sep 3, 2024
Copy link

melvin-bot bot commented Sep 3, 2024

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

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

melvin-bot bot commented Sep 3, 2024

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

@srikarparsi
Copy link
Contributor

Hmm, actually this might be backend. After the SubmitReport call, we do a GetMissingOnyxUpdates which is setting the status of the report back to 0 which is re-rendering the submit button. For some reason, this only happens in staging and not production:

image

@srikarparsi
Copy link
Contributor

Seeing some flickering behavior on production as well occasionally:

Screen.Recording.2024-09-03.at.5.00.47.PM.mov

@slafortune
Copy link
Contributor

Hey @NikkiWines - does the recommended proposal look like a go?

@NikkiWines
Copy link
Contributor

Oops, sorry - missed this one somehow. Agreed that @nkdengineer's proposal to fix the FE bug is good 👍

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

melvin-bot bot commented Oct 29, 2024

📣 @nkdengineer 🎉 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 📖

@nkdengineer
Copy link
Contributor

@eh2077 We have a problem after we submit the report to approver 1 and change the submitsTo to approver 2. If approver 2 clicks on the approver button, BE returns the error.

@melvin-bot melvin-bot bot added the Overdue label Oct 31, 2024
Copy link

melvin-bot bot commented Nov 1, 2024

@slafortune, @NikkiWines, @eh2077, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@NikkiWines
Copy link
Contributor

PR is in the works, @nkdengineer do you need further clarification on this comment?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 1, 2024
@eh2077
Copy link
Contributor

eh2077 commented Nov 4, 2024

@eh2077 We have a problem after we submit the report to approver 1 and change the submitsTo to approver 2. If approver 2 clicks on the approver button, BE returns the error.

@nkdengineer Does the backend error block testing your PR? If so, can you share the detail reproduction steps? Then we can we ask help from @NikkiWines

@NikkiWines
Copy link
Contributor

^^ in the works

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 5, 2024
@nkdengineer
Copy link
Contributor

@nkdengineer Does the backend error block testing your PR? If so, can you share the detail reproduction steps? Then we can we ask help from @NikkiWines

The problem is when I display the approve button for the approver 2 with the original step of the bug, the approver 2 cannot approve the expense report.

@melvin-bot melvin-bot bot removed the Overdue label Nov 11, 2024
@eh2077
Copy link
Contributor

eh2077 commented Nov 11, 2024

@nkdengineer Do you mean after step 5, As admin, change the the submitter's submitsTo to approver 2 in OD, you can't approve the expense if login as approver 2?

@melvin-bot melvin-bot bot added the Overdue label Nov 14, 2024
Copy link

melvin-bot bot commented Nov 15, 2024

@slafortune, @NikkiWines, @eh2077, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@NikkiWines
Copy link
Contributor

@nkdengineer can you respond to @eh2077 here please 🙇

@melvin-bot melvin-bot bot removed the Overdue label Nov 15, 2024
@nkdengineer
Copy link
Contributor

Do you mean after step 5, As admin, change the the submitter's submitsTo to approver 2 in OD, you can't approve the expense if login as approver 2?

@eh2077 Yes, that's correct.

@melvin-bot melvin-bot bot added the Overdue label Nov 18, 2024
@NikkiWines
Copy link
Contributor

@eh2077 do you need any further information here?

@melvin-bot melvin-bot bot removed the Overdue label Nov 18, 2024
@eh2077
Copy link
Contributor

eh2077 commented Nov 18, 2024

@NikkiWines I can still reproduce the unexpected result of the bug report, see step 8. But after performing step 10 and 11, I think the workflow works as expected, or at least there's a workaround for the action of step 5. So, overall, I don't feel strong that it's a bug we have to fix. Wdyt? cc @nkdengineer @trjExpensify


Bellow are the tests on the main

Precondition: log into OD as an admin, create a control policy, enable workspace chats, select "Advanced Approvals", invite 3 members (non-admin): 2 approvers and 1 submitter, set the approval flow as submitter submits to approver 1

  1. Log into ND as submitter
  2. Navigate to the workspace chat
  3. Submit one manual expense
  4. Open the report and click on the "Submit" button
  5. As admin, change the the submitter's submitsTo to approver 2 in OD
  6. Log into ND as approver 1
  7. Opened the submitted report
  8. Click on the "Approve" button

Warning

The Approve button is still available for approver 1, which is unexpected according the bug report

  1. Log into ND as approver 2

Warning

There's no error found except the red dot hint of Expense exceeds auto-approval limit of S$100. There's no Approve button to approve the expense. I can't reproduce the BE error mentioned by @nkdengineer

  1. Log into ND as approver 1 and approve the expense

Note

The expense is submitted to approver 2. I think it makes sense as we modified the flow in step 5.

  1. Log into ND as approver 2 and approve the expense

Note

The expense is approved without error and the status is changed to Waiting for an admin to pay expense(s).

0-48463.mp4

@trjExpensify
Copy link
Contributor

The Approve button is still available for approver 1, which is unexpected according the bug report

Erm, looking at your steps I think that is expected. When a report is already submitted, we don't typically change the approver of submitted reports retrospectively. CC: @garrettmknight for the hip check on whether that's changed.

There's no error found except the red dot hint of Expense exceeds auto-approval limit of S$100. There's no Approve button to approve the expense. I can't reproduce the BE error mentioned by @nkdengineer

Given the above, I would expect there to be no RBR for the "new" approver, but the expense violations would still show on the expense when viewed by anyone with access.

The expense is submitted to approver 2. I think it makes sense as we modified the flow in step 5.

Do you mean the report when approver1 clicks Approve is then sent to the "new" approver to approve as well? If so, I'm not aware of that historical logic. I would have assumed this report would go to the approvesTo || overLimitForwardsTo set for approver1. Any new reports get submitted to the new approver, or if the report is rejected and resubmitted. @NikkiWines I had a rummage for this one in the code, but couldn't find it to confirm/deny.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

10 participants