Closed lanitochka17 closed 4 weeks ago
Triggered auto assignment to @lschurr (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@lschurr 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
Job added to Upwork: https://www.upwork.com/jobs/~016dcbec225a5081d4
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (External
)
No Approve button for policy admin after expense submit
Right here: https://github.com/Expensify/App/blob/4727f72aae4b30aa04153692d0b142e8bacdf703/src/components/MoneyReportHeader.tsx#L124 We'll only show the approve button if we do not have an export integration button (which also means we're not connected to any integration)
So the shouldShowSettlementButton
returns false and does not show the approve button
https://github.com/Expensify/App/blob/4727f72aae4b30aa04153692d0b142e8bacdf703/src/components/MoneyReportHeader.tsx#L264
We can delete this code !shouldShowExportIntegrationButton
which will show the approve button if we also have an export integration button.
No Approve button appears in expense report
This is the logic for the correct states of the expense report which can be exported https://github.com/Expensify/App/blob/5e6527613d0f234fcb22507b878697a2bec356c5/src/libs/ReportUtils.ts#L7269
As it shows, only reports that are approved/reimbursed or closed can be exported.
However, the code for shouldShowExportIntegrationButton
in https://github.com/Expensify/App/blob/5e6527613d0f234fcb22507b878697a2bec356c5/src/components/ReportActionItem/ReportPreview.tsx#L344 and https://github.com/Expensify/App/blob/5e6527613d0f234fcb22507b878697a2bec356c5/src/components/MoneyReportHeader.tsx#L122
Are not checking that condition.
const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin && ReportUtils.canBeExported(moneyRequestReport);
!shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin && ReportUtils.canBeExported(iouReport)
The !shouldShowPayButton && !shouldShowSubmitButton
can potentially be removed because they should already be covered in ReportUtils.canBeExported(iouReport)
In both locations https://github.com/Expensify/App/blob/5e6527613d0f234fcb22507b878697a2bec356c5/src/components/ReportActionItem/ReportPreview.tsx#L344 and https://github.com/Expensify/App/blob/5e6527613d0f234fcb22507b878697a2bec356c5/src/components/MoneyReportHeader.tsx#L122
Add !shouldShowApproveButton
so if approve button will show, the export button will not show. However there could be cases that export button is shown but disabled as the report still doesn't meet the condition in https://github.com/Expensify/App/blob/5e6527613d0f234fcb22507b878697a2bec356c5/src/libs/ReportUtils.ts#L7265. This could be confusing to the user so it's best to add a tooltip like The IOU report can only be exported after it's approved, reimbursed or closed
to the disabled export button to clarify to the user why it's disabled.
Reviewing proposals. This issue is subtle and I'll need more time to understand it.
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@lschurr, @eh2077 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Just a bump here @eh2077
Just found that free trials of my accounts have been ended, so I can't test the workflow anymore.
@lschurr Can you help to grant free trials for my accounts? I requested here https://expensify.slack.com/archives/C02NK2DQWUX/p1722781825171489
Found that new account is granted with 7-day free trial, so I'll be able to review this today.
I think we should go with @daledah 's proposal - Because only reports that are approved/reimbursed or closed can be exported, so we should hide export button when an expense needs to be approved.
β | β |
---|---|
πππ C+ reviewed
Triggered auto assignment to @jasperhuangg, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @eh2077 π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing π
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
This issue has not been updated in over 15 days. @jasperhuangg, @lschurr, @eh2077, @daledah eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
I think our automation was broken for a while. This was deployed to production a while ago without any regressions.
@lschurr Do you mind paying out @daledah for implementing the solution to this issue and @eh2077 for reviewing proposals/PRs? I think we can safely close out this issue after that.
Yep! Payment summary:
Contributor: $250 @daledah - Can you link your Upwork profile here?
@lschurr Here it is https://www.upwork.com/freelancers/~0138d999529f34d33f
Offer sent @daledah - https://www.upwork.com/nx/wm/offer/104302674
Offer accepted thx @lschurr
Great, all set!
Requested in newdot
$250 approved for @eh2077
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: 9.0.12-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 found when executing PR https://github.com/Expensify/App/pull/45867
Action Performed:
Preconditions: user has Control policy. Owner is an approver. Workspace is connected to QBO.
Expected Result:
There is an Approve button appears in expense report after Submit
Actual Result:
No Approve button appears in expense report
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/b647c6ee-b4e9-47ee-a1dc-782cbfb57a0d
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @lschurr