-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Awaiting Payment] Remove "submit expense" from the create menu in reports that can't be edited by the submitter #50734
Comments
Triggered auto assignment to @garrettmknight ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Remove "submit expense" from the create menu in reports that can't be edited by the submitter What is the root cause of that problem?The error in the actual result: What changes do you think we should make in order to solve the problem?According to expected results, we need to hide the submit option, we can do that in Line 6684 in bd163a4
We will use Line 512 in bd163a4
So add a new condition to --- a/src/libs/ReportUtils.ts
+++ b/src/libs/ReportUtils.ts
@@ -6687,6 +6687,10 @@ function canRequestMoney(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>, o
return false;
}
+ if(PolicyUtils.getSubmitToAccountID(policy, currentUserAccountID ?? -1) !== report?.managerID){
+ return false
+ } ResultScreen.Recording.2024-10-15.at.1.50.19.AM.mov |
Job added to Upwork: https://www.upwork.com/jobs/~021845992378187974958 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov ( |
I'm gonna take this one internal as I'll need to test App changes against backend changes for a related issue. |
@youssef-lr I have a proposal ready which solves the App issue, can't we test it with my PR ?, you can check the proposal here and since help wanted label was applied, I guess my proposal counts 😄 |
@twilight294 your proposal is not enough to fully fix the issue, for example, if will break when the approver has a vacation delegate. This will need some backend changes in order to have some data available in App, and I'm going to need to test both backend and frontend while working on this. |
I just realized I already had a PR that fixes this #49677, but I need to update it to take into account the delegate. |
@garrettmknight, @youssef-lr, @alitoshmatov Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Working on it in this PR #49677 |
@garrettmknight, @youssef-lr, @alitoshmatov 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
PR is still in progress #49677 |
PR is merged and on staging. |
@garrettmknight @youssef-lr @alitoshmatov this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Great work here! |
On prod yesterday! |
@mollfpr you get paid somewhere else for your review? |
@garrettmknight I think I'll be paid here #51075 |
Perfect - I'm gonna close this then! |
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: N/A
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: @jliexpensify
Slack conversation: https://expensify.enterprise.slack.com/archives/C049HHMV9SM/p1728931883829909?thread_ts=1728667465.791999&channel=C049HHMV9SM&message_ts=1728931883.829909
Action Performed:
I think this is what the behavior is intended to be in this situation:
Expected Result:
The submitter should only see the add attachment and assign task.
Actual Result:
The submitter has the "submit expense" option and when they try to use it, it throws an error.
Workaround:
Submit an expense in the workspace chat.
Platforms:
All
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: