Open trjExpensify opened 2 weeks ago
Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new.
Job added to Upwork: https://www.upwork.com/jobs/~021877786460553153940
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External
)
@trjExpensify Your clue is accurate.
@trjExpensify Your clue is accurate.
@trjExpensify is gonna take our job away !!!!!
Haha ❤️
Users can't submit a report that contains no reimbursable expenses
Button only show in case of reimbursableSpend != 0 as mention by @trjExpensify.
We need to make sure button is showing in case of reimbursableSpend is 0. For this we need to remove reimbursableSpend !== 0
condition in this three places.
NA
Users can't submit a report that contains no reimbursable expenses
As stated by @trjExpensify, we have this line that prevents the submit button from appearing if the expense is not reimbursable.
We need to remove the conditions that block submission if the expense is not reimbursable. Particularly, we need to remove the condition here, here and here.
Adding a regression test for submitting a non reimbursable expense should suffice.
N/A
Users can't submit a report that contains no reimbursable expenses
We only check for reimbursableSpend !== 0
:
This causes the button to be hidden
We need to update the condition such that it will not show only when the reimbursible - non-reimbursible = 0
:
const shouldShowSubmitButton =
isOpenExpenseReport &&
(reimbursableSpend - nonReimbursableSpend) !== 0 &&
We need to update other places as well here and here
Edited by proposal-police: This proposal was edited at 2025-01-10 19:14:25 UTC.
Users can't submit a report that contains no reimbursable expenses
As stated by @trjExpensify, we have this line that prevents the submit button from appearing if the expense is not reimbursable. We should have checked for totalSpend instead of reimbursableSpend.
We need to update the conditions that block submission if the expense is not reimbursable. Particularly, we need to update the condition here, here and here.
The updated condition should be totalDisplaySpend !== 0
to check for total spend instead of reimbursable spend in case of the submit button.
[!NOTE] We should also check conditions for approvals too for the same problem.
Adding a regression test for submitting a non reimbursable expense should suffice.
N/A
The updated condition should be totalDisplaySpend !== 0 to check for total spend instead of reimbursable spend in case of the submit button.
Can we have a case @shubham1206agra where a money report is created and it has a 0
spend?
Ah, I see. If a scan fails, then the total spend would be 0 unless entered manually. Till its entered, we shouldn't show the submit button. Adding totalDisplaySpend
is better. 👍
taking over c+ role https://expensify.slack.com/archives/C02NK2DQWUX/p1736539732521579?thread_ts=1736534208.861619&cid=C02NK2DQWUX
@shubham1206agra's proposal makes sense to me a works as expected.
🎀 👀 🎀
Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
We should also check conditions for approvals too for the same problem.
can you please list test steps for such cases @shubham1206agra
taking over c+ role https://expensify.slack.com/archives/C02NK2DQWUX/p1736539732521579?thread_ts=1736534208.861619&cid=C02NK2DQWUX
@shubham1206agra's proposal makes sense to me a works as expected.
🎀 👀 🎀
@lakchote @ishpaul777 In my proposal i used reimbursableSpend - nonReimbursableSpend
because it is more readable and easy to understand the condition when shouldShowSubmitButton
should be true :)) , both the proposals are going to yield the same result , so can you re-review the proposal please
taking over c+ role https://expensify.slack.com/archives/C02NK2DQWUX/p1736539732521579?thread_ts=1736534208.861619&cid=C02NK2DQWUX @shubham1206agra's proposal makes sense to me a works as expected. 🎀 👀 🎀
@lakchote @ishpaul777 In my proposal i used
reimbursableSpend - nonReimbursableSpend
because it is more readable and easy to understand the condition whenshouldShowSubmitButton
should be true :)) , both the proposals are going to yield the same result , so can you re-review the proposal please
Haha what?? @twilight2294 I think you used wrong notation here. I think what you meant to do is reimbursableSpend + nonReimbursableSpend
instead of current one. Current one will cause problem when both reimbursable and non reimbursable spends are equal.
Current assignee @lakchote is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
Thanks for responding @shubham1206agra .
I think what you meant to do is reimbursableSpend + nonReimbursableSpend instead of current one.
No it should be reimbursableSpend - nonReimbursableSpend
itself, getMoneyRequestSpendBreakdown
returns +
values for both the variables
Current one will cause problem when both reimbursable and non reimbursable spends are equal.
When both are equal we shouldn't show the submit button
at all right ? even with your proposal we won't show the submit button when both will be equal
@shubham1206agra's proposal LGTM.
@shubham1206agra could you address this comment from @ishpaul777 please?
📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
📣 @ishpaul777 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
@shubham1206agra's proposal LGTM.
@shubham1206agra could you address this comment from @ishpaul777 please?
@lakchote This will be addressed in https://github.com/Expensify/App/issues/54996 actually.
@shubham1206agra , @lakchote I guess, @allroundexperts 's proposal to remove the check is correct here.
Saying cause you can test the following:
You will see a submit button for the report:
So i guess the correct approach is to remove that check completely, what do you guys think ?
Let me discuss this with @trjExpensify here https://expensify.slack.com/archives/C02NK2DQWUX/p1736534208861619
Edit - I don't think we should be able to submit expenses if total is zero.
@shubham1206agra could you please add the Slack discussion details here in the comment as I don't have access to Slack?
@shubham1206agra can you please update the status of PR?
Will open a PR by EOD
@shubham1206agra any ETA on the PR?
@lakchote I am discussing some last questions here https://expensify.slack.com/archives/C02NK2DQWUX/p1737390502910259. Just to make sure no future bugs arises here.
Update - Draft PR is up. Waiting for first round of review by C+.
@trjExpensify @lakchote @shubham1206agra @ishpaul777 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!
@shubham1206agra should you convert that into reviewing if we're asking C+ to review? Melvin will leave us alone then ;)
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: Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: 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: @danielrvidal Slack conversation (hyperlinked to channel name): #retain
Action Performed:
Submit
button on the report preview, in the report header, and on the search page.Submit
button is no longer visible on the report preview, report header or search page.Expected Result:
Users should be able to see the
Submit
button on an expense report that contains only non-reimbursable expenses, providing they aren't all pending transactions.Actual Result:
There's no
Submit
button on an expense report that contains only non-reimbursable expenses.Note: I think this line here is culprit. Perhaps it's also in a few other places where you see the submit button.
Workaround:
They can submit via OldDot.
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/7ed3c5e0-c80a-4e69-9510-a4fd7a524f31
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @s77rt