-
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
[HOLD for payment 2024-10-10] [Report next steps audit] Next step in report header changes after returning online #47278
Comments
Triggered auto assignment to @trjExpensify ( |
@trjExpensify 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-control |
Put on the radar of @dylanexpensify @dangrous and co here as it's in dev, checking if these are internal or not: https://expensify.slack.com/archives/C06ML6X0W9L/p1723559615613289?thread_ts=1723491174.174309&cid=C06ML6X0W9L |
Okay I just tried replicating this - I'm not getting the same notes - for the step 4 one, I get For step 10, I'm getting "no further action required" from the backend so that should be updated. |
Huh this is much more complicated than I thought on the backend. I've made a draft PR but struggling with some pieces, I will come back to it later. It sounds like from Slack that this is okay to punt a little, since we're not holding on it for the end of the project (seems like a bug that existed before). |
Progress is being made! The trick here is that I think the existing tests were incorrect. I've pushed a fix to the linked PR, and I think we should be moving shortly, assuming @mountiny agrees with the changes I've made (which honestly I'm not confident on) |
PR is on staging Melv. |
This is on prod so we should be able to test and close out! |
oh actually i lied - it looks like there was a front end piece that we might need (I wrote This will get done soon though! |
Hi it's me, back with another question about expected behavior @trjExpensify @mountiny. So - the logic here all works as we want it to. EXCEPT - the front end is calculating a different person as the "reimburser" than the back end. I'd love to know which you think is correct (I can also bring this to Slack) In the following situation:
Who is the reimburser that we want to show here? Any admin should be able to reimburse (is that correct?) so would we show Alice, Bob, or Clarissa? Right now the front end looks for a reimburser for the policy and if one isn't set up defaults to the owner. The backend, essentially, looks for a reimburser for the report (as in, the person who has taken a reimbursement action), and if one isn't set up, defaults to the manager. I think the backend behavior is incorrect (I used the report's What name/user do we want shown here? |
Who's been set as the reimburser on the workspace in the settings? |
You need to be on |
Interesting... so who should we show if the workspace is NOT on direct reimbursement and/or doesn't have a VBBA? Since that's the situation in the repro steps |
Do we still have a |
okay let me see what happens if an employee is submitting to another employee (not admin). I think the backend will still default to an admin, not necessarily the owner, but it sounds like that's correct here - and so we need to update the front end to match as well. Will have to figure out how it picks between admins if there is more than one, so we can replicate that too... |
@dangrous When you set a reimburser and then you change the reimbursement choice, the reimburserEmail is not not cleared i believe. Its how it worked in oldDot so maybe its colliding with the updated next steps logic |
I think the trick with this particular set up is that no reimburser is set at all? What's the default value for the field if it's never touched? |
Got it, so basically we want both the front end and the back end to pick an admin - and it doesn't really matter what admin. However, right now they're picking different ones. Probably the easiest solution would be to have the backend also use the policy owner, since that's always going to be the same. Is the owner always an admin? I think so... How does that sound? If good, I can adjust the fallback on the backend, and then we should (finally) be done with this! |
Yep, the owner is always an admin. Why are we randomly picking a named admin instead of just something generic when there's no designated reimburser? Like we had before highlighted in the screenshot? 🤔 |
oh, like say "an admin" in the message? I think we were trying to always name the people who needed to take the action - that's the pattern in the updated nextSteps (cc @dylanexpensify). I think it's safe here to always pick the workspace owner, who will be valid in all cases. I'll see if I can make that backend change EDIT: Draft PR below, just waiting on confirmation that this is the behavior we want, before putting it into review. It's otherwise ready. |
I get that, but in this case it could be any admin. Consider this..
So I think in the case of |
That makes sense to me! Do we need confirmation from anyone else who worked on the project, or should I go ahead with that? |
Let's see. @dylanexpensify has been pinged, I think @JmillsExpensify helped as well. Any thoughts, guys? With the report next steps project we killed the generic "Waiting for an admin to pay" message, so as a result, it's a bit of a crab shoot who we name when no reimburser is set (i.e with indirect reimbursement). I'm suggesting here we bring that generic one back for that case. |
What are the next steps here, @dangrous? |
Chiming in I agree with bringing back the generic "an admin" phrase for indirect. cc @mountiny to confirm if this works ok with the migration? |
So I have https://github.com/Expensify/Web-Expensify/pull/43483/files up for the backend - and #49424 for the front end. If there is a reimburser explicitly set for the policy, it will use their info, if not it will just say "an admin". |
How's this looking in review? |
BE is done, App should be hopefully done today! Waiting on reviewer testing |
App PR is merged! Not yet deployed, but soon |
on staging... |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.43-6 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-10-10. 🎊 |
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:
|
No PR introduced this bug, just logic / edge cases. I don't think we need a new regression test, so can probably close out? (I don't think we need any payment for anyone either.) |
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.19.2
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
Issue found when executing PR #44940
Action Performed:
precondition: create a control workspace, set "Manually approve all expenses" over to $10 and set advanced approval in OD:
boss owner (admin) submits to mini owner
mini owner (admin) submits boss owner
manager (employee) submits to mini owner forwards to mini owner over limit forwards (limit 100) to boss owner
employee 1 (employee) submits to manager
employee 2(employee) submits to manager
Expected Result:
The same next step in report header displayed offline and online: for step 4 it is "Waiting for Manager approve expense(s)", and for step 10 it is "No further action required!"
Actual Result:
When user returns online, the next step in report header changes from "Waiting for Manager approve expense(s)" to "Waiting for employee 1 submit their expense (s)" for step 4 and from "Waiting for Boss owner pay expense(s) to "No further action required!" for step 4
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6570207_1723486899933.Recording__667.mp4
View all open jobs on GitHub
Issue Owner
Current Issue Owner: @trjExpensifyThe text was updated successfully, but these errors were encountered: