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

[HOLD for payment 2024-02-01] [$500] Pay button is shown briefly after approval when the policy has auto-reimbursement enabled #33716

Closed
1 of 6 tasks
kbecciv opened this issue Dec 28, 2023 · 24 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Dec 28, 2023

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.17.1
Reproducible in staging?: y
Reproducible in production?: y
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: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Create a collect policy in OldDot with direct reimbursement
  2. Execute the following JS snippet in the OldDot policy to enable workspace chats creation:
    if (Url.getCurrentPageName()!="policy" ){ alert('Only run this snippet from a policy editor!'); } else { var p = Policy.getCurrent(); p.policy.isPolicyExpenseChatEnabled = "true"; p.save().done(function(){$.jGrowl('Workspace chat creation enabled!')}); }
  3. Add a member and an approver (the approver can be the policy owner too)
  4. Login in one session as a member and in another session as the approver
  5. As member, create a money request and submit it in the workspace chat
  6. Verify the money request appears in the approver's workspace chat
  7. Approve the report

Expected Result:

Should see the text " waiting for your admin to pay these expenses" in the header as a approver

Actual Result:

Approver is able to pay the request.

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

Bug6321973_1703114385175.Recording__343.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01eef76618a7ab320c
  • Upwork Job ID: 1740413058975150080
  • Last Price Increase: 2023-12-28
Issue OwnerCurrent Issue Owner: @bfitzexpensify
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 28, 2023
@melvin-bot melvin-bot bot changed the title Web - As a approver able to pay the request [$500] Web - As a approver able to pay the request Dec 28, 2023
Copy link

melvin-bot bot commented Dec 28, 2023

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

Copy link

melvin-bot bot commented Dec 28, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 28, 2023
Copy link

melvin-bot bot commented Dec 28, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 28, 2023

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

@shubham1206agra
Copy link
Contributor

@marcochavezf Didn't we fix this in the approve flow? I remember we fixed this

@shubham1206agra
Copy link
Contributor

I am unable to repro this

Ideal behaviour reference

#28976 (comment)

@marcochavezf
Copy link
Contributor

Didn't we fix this in the approve flow? I remember we fixed this

Ah the issue here is that when a policy has auto-reimbursement enabled, we're showing briefly the Pay button after approval, which shouldn't be the case since the backend will pay automatically once the request for approval has been processed.

@marcochavezf
Copy link
Contributor

marcochavezf commented Dec 29, 2023

I will assign myself to work on it. I think we'd need to send from the backend the reimbursement data through Onyx to avoid showing the Pay button after approval if auto-reimbursement is enabled.

@marcochavezf marcochavezf self-assigned this Dec 29, 2023
@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
Copy link

melvin-bot bot commented Jan 2, 2024

@marcochavezf, @bfitzexpensify, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!

@marcochavezf
Copy link
Contributor

No update, but it's on my priorities

@melvin-bot melvin-bot bot removed the Overdue label Jan 3, 2024
@trjExpensify
Copy link
Contributor

Ah the issue here is that when a policy has auto-reimbursement enabled, we're showing briefly the Pay button after approval, which shouldn't be the case since the backend will pay automatically once the request for approval has been processed.

Can we update the OP of this issue and the title to reflect the problem at hand here?

@marcochavezf
Copy link
Contributor

Sure, updating it

@marcochavezf marcochavezf changed the title [$500] Web - As a approver able to pay the request [$500] Pay button is shown briefly after approval when the policy has auto-reimbursement enabled Jan 4, 2024
@marcochavezf
Copy link
Contributor

Changing it to internal since it requires a backend change.

@marcochavezf marcochavezf added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Jan 4, 2024
Copy link

melvin-bot bot commented Jan 4, 2024

Current assignee @aimane-chnaif is eligible for the Internal assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jan 5, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jan 5, 2024
@marcochavezf
Copy link
Contributor

PRs up

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 25, 2024
@melvin-bot melvin-bot bot changed the title [$500] Pay button is shown briefly after approval when the policy has auto-reimbursement enabled [HOLD for payment 2024-02-01] [$500] Pay button is shown briefly after approval when the policy has auto-reimbursement enabled Jan 25, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

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

Copy link

melvin-bot bot commented Jan 25, 2024

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

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

Copy link

melvin-bot bot commented Jan 25, 2024

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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 31, 2024
Copy link

melvin-bot bot commented Feb 1, 2024

Payment Summary

Upwork Job

BugZero Checklist (@bfitzexpensify)

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

@aimane-chnaif
Copy link
Contributor

No regression. I don't think any previous PR break this behavior which used to work before.
As reported by QA team, we can skip regression test.

Copy link

melvin-bot bot commented Feb 6, 2024

@marcochavezf, @bfitzexpensify, @aimane-chnaif Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Feb 6, 2024
@marcochavezf
Copy link
Contributor

Not overdue, waiting for payment

@melvin-bot melvin-bot bot removed the Overdue label Feb 6, 2024
@bfitzexpensify
Copy link
Contributor

Offer sent @aimane-chnaif

@melvin-bot melvin-bot bot added the Overdue label Feb 9, 2024
@bfitzexpensify
Copy link
Contributor

Payment complete

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. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants