App icon indicating copy to clipboard operation
App copied to clipboard

Expense - "Approved" is not present in Amount in request details page for approved expense

Open lanitochka17 opened this issue 1 year ago • 5 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: 1.3.45-5 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4264387 Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:

Action Performed:

Precondition:

  • Admin and employee are part of Collect workspace
  • Admin is also approver in the Collect workspace
  1. [Employee] Create a manual request in the workspace chat
  2. [Employee] Submit the report
  3. [Admin] Go to workspace chat with employee
  4. [Admin] Click on the request preview
  5. [Admin] Click on the dropdown button next to the green button on the top right > Approve
  6. [Admin] Approve the report
  7. [Admin] Click on the expense preview

Expected Result:

"Approved" will be present next to "Amount • Cash" in request details page

Actual Result:

"Approved" is not present next to "Amount • Cash" in request details page, while it is present next to "Cash" in expense preview in expense report

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/6afb6b9f-b44c-4ecc-a3f7-4ff66c3707d9

View all open jobs on GitHub

lanitochka17 avatar Feb 02 '24 14:02 lanitochka17

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Feb 02 '24 14:02 melvin-bot[bot]

We think that this bug might be related to #wave7 CC @RachCHopkins

lanitochka17 avatar Feb 02 '24 14:02 lanitochka17

@sakluger Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Feb 05 '24 15:02 melvin-bot[bot]

Proposal

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

"Approved" is not present in Amount in request details page for approved expense

What is the root cause of that problem?

Currently we have the condition to check for approved transactions as: https://github.com/Expensify/App/blob/51303b5c2a392660193feb809f61105e090f9c15/src/components/ReportActionItem/MoneyRequestView.tsx#L178-L180

But here we pass report, which in turn returns false, and hence the text for approved is not added

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

We need to update the conditions of adding the approved text with conditions similar to the preview page:

https://github.com/Expensify/App/blob/51303b5c2a392660193feb809f61105e090f9c15/src/components/ReportActionItem/MoneyRequestPreview.tsx#L208-L210

What alternative solutions did you explore? (Optional)

N/A

allgandalf avatar Feb 05 '24 17:02 allgandalf

Asked in #wave7 if it's connected to that wave.

sakluger avatar Feb 06 '24 00:02 sakluger

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

melvin-bot[bot] avatar Feb 07 '24 18:02 melvin-bot[bot]

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

melvin-bot[bot] avatar Feb 07 '24 18:02 melvin-bot[bot]

Hi @GandalfGwaihir, thanks for the proposal but the extra conditionals don't solve the issue. I noticed we're getting the status and state from the wrong report (transaction report) instead of the money request.

marcochavezf avatar Feb 07 '24 19:02 marcochavezf

I'm going to create a PR since it's a quick fix, I will remove the external label

marcochavezf avatar Feb 07 '24 19:02 marcochavezf

Triggered auto assignment to Contributor Plus for review of internal employee PR - @eVoloshchak (Internal)

melvin-bot[bot] avatar Feb 13 '24 04:02 melvin-bot[bot]

Sent an offer to @eVoloshchak via Upwork for the PR review.

sakluger avatar Feb 13 '24 04:02 sakluger

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

melvin-bot[bot] avatar Feb 13 '24 18:02 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.40-5 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/36063

If no regressions arise, payment will be issued on 2024-02-20. :confetti_ball:

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

  • @eVoloshchak requires payment through NewDot Manual Requests

melvin-bot[bot] avatar Feb 13 '24 18:02 melvin-bot[bot]

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:

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

melvin-bot[bot] avatar Feb 13 '24 18:02 melvin-bot[bot]

Sent an offer to @eVoloshchak via Upwork for the PR review.

@sakluger, no need for Upwork, I get paid via NewDot I'll request the payment for this on 20th (assuming no regressions arise)

eVoloshchak avatar Feb 14 '24 13:02 eVoloshchak

Thanks for clarifying @eVoloshchak. Our spreadsheet said that you didn't do NewDot requests, sorry about that.

sakluger avatar Feb 15 '24 00:02 sakluger

Payment Summary

Upwork Job

  • Reviewer: @eVoloshchak owed $500 via NewDot

BugZero Checklist (@sakluger)

  • [x] I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • [x] I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1755300910406561792/hired)
  • [x] I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • [x] I have verified the payment summary above is correct

melvin-bot[bot] avatar Feb 20 '24 15:02 melvin-bot[bot]

  • The PR that introduced the bug has been identified. Link to the PR: https://github.com/Expensify/App/pull/28976
  • 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: https://github.com/Expensify/App/pull/28976/files#r1495989726
  • 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: I don't think an additional discussion is needed here, this is a pretty minor bug

eVoloshchak avatar Feb 20 '24 15:02 eVoloshchak

Regression Test Proposal

Preconditions:

  1. Admin and employee are part of a Collect workspace
  2. Admin is also approver in the Collect workspace

Test steps:

  1. [Employee] Create a manual request in the workspace chat
  2. [Employee] Submit the report
  3. [Admin] Go to workspace chat with employee
  4. [Admin] Click on the request preview
  5. [Admin] Click on the dropdown button next to the green button on the top right > Approve
  6. [Admin] Approve the report
  7. [Admin] Click on the expense preview
  8. [Admin] Verify the text "Approved" appears in the description (i.e. Amount*Cash*Approved)

Do we agree 👍 or 👎

eVoloshchak avatar Feb 20 '24 15:02 eVoloshchak

The test steps look good! You're all set to request payment via NewDot.

sakluger avatar Feb 21 '24 02:02 sakluger

$500 approved for @eVoloshchak based on summary above.

JmillsExpensify avatar Feb 27 '24 18:02 JmillsExpensify