-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 - Pay with Expensify button appears for Employee after admin disconnects bank account #46738
Comments
Triggered auto assignment to @miljakljajic ( |
@miljakljajic FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #wave-collect - Release 1 |
@miljakljajic Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Job added to Upwork: https://www.upwork.com/jobs/~01e26750961886bca4 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
@jjcoffee, @miljakljajic Huh... This is 4 days overdue. Who can take care of this? |
Waiting for proposals! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Bumped on Slack to hopefully get some proposals in! |
@jjcoffee @miljakljajic this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@miljakljajic Maybe we should try bumping the price to get more eyes on this? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
This isn't getting any attention, let's bump the price @miljakljajic |
@jjcoffee, @miljakljajic Huh... This is 4 days overdue. Who can take care of this? |
reconfirming the expected outcome here - I'm not clear on why the employee would see the Pay with Expensify option |
I managed to track the issue all the way down to this condition here: https://github.com/teneeto/Expensify/blob/dcf1a0cac762ef658ebfa8f692331f04828d6716/src/libs/ReportUtils.ts#L1640-L1649 Each time a workspace bank account is removed, I'm still looking at how best this could be fixed - which i don't expect, should take any longer before i raise a PR. |
@twisterdotcom, @teneeto, @jjcoffee Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@twisterdotcom @jjcoffee a PR is raised here: #49969 Here are my thoughts on my solution and possible alternatives (if needed). ProblemOn these lines: SoutionI found another field alternate solutionWe can find out why ScreenshotThe video below shows a log of policy objects and the variation in the Screen.Recording.2024-10-01.at.08.20.42.mov |
@teneeto Thanks for the investigation and for the detailed write-up! I just need to clarify a few points before proceeding.
Are you saying that once the bank account is disconnected, the I think the main confusion for me here is that the employee shouldn't be seeing the pay button at all as they are not the "reimburser" (in either condition). So it seems like once the bank account is disconnected, the employee is treated as the reimburser for some reason. Lines 1641 to 1647 in dcf1a0c
|
Yes, Overall, the conditions with |
That makes sense, thanks! I guess I'm a bit unsure on why there are two fields for 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @srikarparsi, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
The RCA here makes sense to me. I do think we should go with the alternate solution listed though since we already store reimbursementChoice and don't think we need a new variable for that data. Also, I don't think we should ever show the pay button to regular employees (not admins, managers...). @rlinoz, do you know why we show the settlement button in this line if reimburser is empty (and the report is approved)? |
I think it comes from here actually #38253, but I am not sure what we were fixing, maybe @luacmartins remembers |
Form the PR above, that covers this case when reimbursements are enabled but there's no VBBA account, hence no
|
How do we proceed with this, are we looking at a different route? |
Sounds like this maybe needs to be internal if we plan to fix |
I'm still keeping up with it. Ping me if you need me to make any changes regarding this issue. |
@twisterdotcom @jjcoffee @srikarparsi do we proceed with this as a BE issue and internal? what should we do with this PR. Just curious to know how we can proceed with this issue based on our previous discussions |
Ping! Ping!! @twisterdotcom @jjcoffee @srikarparsi, I'm just knocking to check the next steps on this issue and the PR that has already been raised. Do you have any ideas or suggestions on what I can do next? |
Ping ping indeed. Really need @srikarparsi to chime in, but it does sound like we need this to be Internal. |
Hey, yes this does look backend but it is a little intersting. Sorry for the delay in responding. In the backend, whenever we set reimbursementChoice, we nest it under policy.reimbursement.choice. But in the frontend, we directly access it as policy.reimbursementChoice. This is because we send the onyx update directly under policy instead of under policy.reimbursement.choice. But, it looks like we missed doing that in one place which is why policy.reimbursement.choice.reimbursementChoice is updating but policy.reimbursementChoice is not. So two approaches:
I'm going to make this internal since I think 2 is the better approach for now. |
I do think generally that it's better to keep the front-end and back-end aligned if we can. It just makes things simpler and less confusing. Is it a big refactor to do so? |
Cool, yeah. It's not crazy big, there's 51 occurrences in App of reimbursementChoice. I did not count how many instances we queue onyx updates to reimbursementChoice in the backend but it doesn't look like it's too too many. I agree that it'll probably be better for the long run but just wasn't sure in terms of priorities right now. But if you think now would be a good time to refactor it, I can start working on that. |
I think it's as good a time as any. Thanks so much for handling! |
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.16-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Expected Result:
"Pay with Expensify" button will not appear on expense preview on employee end after admin has disconnected bank account
Actual Result:
"Pay with Expensify" button shows up on expense preview on employee end after admin has disconnected bank account.
When clicking on the expense preview and returning to main chat, the button disappears
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6560213_1722605179858.20240802_211830.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @teneetoThe text was updated successfully, but these errors were encountered: