Skip to content

[HOLD for payment 2024-06-06] [$250] Wrong "Next step" displayed for the approver #41614

Closed

Description

@m-natarajan

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: 1.4.70-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @JmillsExpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1714518611299619

Action Performed:

Prerequisite: Have a collect workspace with admin, approver, and employee.

  1. Employee submits report to approver
  2. Approver approves the report
  3. Observe the next step header for approver

Expected Result:

"Waiting for you to pay these expenses" should not be displayed for the approver

Actual Result:

"Waiting for you to pay these expenses" is displayed for approver who is not configured to pay the report

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

CleanShot 2024-04-30 at 17 09 15@2x

pay.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e9b6cf8e506af2ea
  • Upwork Job ID: 1787692015561465856
  • Last Price Increase: 2024-05-07
  • Automatic offers:
    • dukenv0307 | Reviewer | 0
Issue OwnerCurrent Issue Owner: @adelekennedy

Activity

  1. added
    Daily
    Bug
    on May 3, 2024
  2. melvin-bot commented on May 3, 2024

    @melvin-bot

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

  3. cretadn22 commented on May 4, 2024

    @cretadn22
    Contributor

    Proposal

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

    Payer is wrong in the header

    What is the root cause of that problem?

    When an employee creates a money request, the backend returns a request report where the managerID is the ID of the approver

    if (!isOwner) {
    optimisticNextStep.message = [
    {
    text: 'Waiting for ',
    },
    {
    text: managerDisplayName,
    type: 'strong',

    Given that managerDisplayName is "you"

    If I understand correctly:

    • ownerID corresponds to the ID of the request creator
    • managerID corresponds to the ID of the workspace admin

    If this understanding is accurate, then the current logic here is wrong

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

    We need to extract the approverID from the policy using approverID = policy.submitsTo. Then

    • If the current user is the approver, we'll show "you"
    • If the current user isn't the approver, we'll display the name of the approver

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. melvin-bot commented on May 7, 2024

    @melvin-bot

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

  5. added
    External
    on May 7, 2024
  6. changed the title [-]Wrong "Next step" displayed for the approver[/-] [+][$250] Wrong "Next step" displayed for the approver[/+] on May 7, 2024
  7. melvin-bot commented on May 7, 2024

    @melvin-bot
  8. added
    Help Wanted
    on May 7, 2024
  9. melvin-bot commented on May 7, 2024

    @melvin-bot

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

  10. 23 remaining items

  11. melvin-bot commented on May 30, 2024

    @melvin-bot

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

  12. removed
    Reviewing
    on May 30, 2024
  13. melvin-bot commented on May 30, 2024

    @melvin-bot

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

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

  14. melvin-bot commented on May 30, 2024

    @melvin-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:

    • [@dukenv0307] The PR that introduced the bug has been identified. Link to the PR:
    • [@dukenv0307] 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:
    • [@dukenv0307] 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:
    • [@dukenv0307] Determine if we should create a regression test for this bug.
    • [@dukenv0307] 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.
    • [@adelekennedy] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. added
    Daily
    and removed
    Weekly
    on Jun 6, 2024
  16. adelekennedy commented on Jun 6, 2024

    @adelekennedy
    Contributor

    @dominictb do you mind applying to the job here so I can pay you out? Thank you!!

  17. adelekennedy commented on Jun 7, 2024

    @adelekennedy
    Contributor

    @dominictb accepted

  18. dominictb commented on Jun 7, 2024

    @dominictb
    Contributor

    @adelekennedy Offer accepted, thanks

  19. adelekennedy commented on Jun 10, 2024

    @adelekennedy
    Contributor

    payments made! @dukenv0307 do we need a regression test here?

  20. dukenv0307 commented on Jun 10, 2024

    @dukenv0307
    Contributor

    BugZero Checklist:

    • The PR that introduced the bug has been identified. Link to the PR: N/A
    • 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: N/A
    • 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: N/A
    • Determine if we should create a regression test for this bug. N/A
    • 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. N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions