You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Workspace - No Approve button for policy admin after expense submit #46227
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
@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
changed the title [-]Workspace - No Approve button for policy admin after expense submit[/-][+][$250] Workspace - No Approve button for policy admin after expense submit[/+]on Jul 25, 2024
The !shouldShowPayButton && !shouldShowSubmitButton can potentially be removed because they should already be covered in ReportUtils.canBeExported(iouReport)
What alternative solutions did you explore? (Optional)
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
. 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.
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.
Activity
melvin-bot commentedon Jul 25, 2024
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.lanitochka17 commentedon Jul 25, 2024
@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
[-]Workspace - No Approve button for policy admin after expense submit[/-][+][$250] Workspace - No Approve button for policy admin after expense submit[/+]melvin-bot commentedon Jul 25, 2024
Job added to Upwork: https://www.upwork.com/jobs/~016dcbec225a5081d4
melvin-bot commentedon Jul 25, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (
External)NJ-2020 commentedon Jul 26, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
No Approve button for policy admin after expense submit
What is the root cause of that problem?
Right here:
App/src/components/MoneyReportHeader.tsx
Line 124 in 4727f72
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
shouldShowSettlementButtonreturns false and does not show the approve buttonApp/src/components/MoneyReportHeader.tsx
Line 264 in 4727f72
What changes do you think we should make in order to solve the problem?
We can delete this code
!shouldShowExportIntegrationButtonwhich will show the approve button if we also have an export integration button.What alternative solutions did you explore? (Optional)
daledah commentedon Jul 27, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
No Approve button appears in expense report
What is the root cause of that problem?
This is the logic for the correct states of the expense report which can be exported
App/src/libs/ReportUtils.ts
Line 7269 in 5e65276
As it shows, only reports that are approved/reimbursed or closed can be exported.
However, the code for
shouldShowExportIntegrationButtoninApp/src/components/ReportActionItem/ReportPreview.tsx
Line 344 in 5e65276
App/src/components/MoneyReportHeader.tsx
Line 122 in 5e65276
Are not checking that condition.
What changes do you think we should make in order to solve the problem?
Update
App/src/components/MoneyReportHeader.tsx
Line 122 in 5e65276
Likewise for
App/src/components/ReportActionItem/ReportPreview.tsx
Line 344 in 5e65276
The
!shouldShowPayButton && !shouldShowSubmitButtoncan potentially be removed because they should already be covered inReportUtils.canBeExported(iouReport)What alternative solutions did you explore? (Optional)
In both locations
App/src/components/ReportActionItem/ReportPreview.tsx
Line 344 in 5e65276
App/src/components/MoneyReportHeader.tsx
Line 122 in 5e65276
Add
!shouldShowApproveButtonso 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 inApp/src/libs/ReportUtils.ts
Line 7265 in 5e65276
The IOU report can only be exported after it's approved, reimbursed or closedto the disabled export button to clarify to the user why it's disabled.eh2077 commentedon Jul 29, 2024
Reviewing proposals. This issue is subtle and I'll need more time to understand it.
melvin-bot commentedon Aug 1, 2024
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
17 remaining items
daledah commentedon Aug 8, 2024
@eh2077 this PR is ready for review
melvin-bot commentedon Sep 2, 2024
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!
jasperhuangg commentedon Sep 26, 2024
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.
lschurr commentedon Oct 1, 2024
Yep! Payment summary:
daledah commentedon Oct 5, 2024
@lschurr Here it is https://www.upwork.com/freelancers/~0138d999529f34d33f
lschurr commentedon Oct 7, 2024
Offer sent @daledah - https://www.upwork.com/nx/wm/offer/104302674
daledah commentedon Oct 7, 2024
Offer accepted thx @lschurr
lschurr commentedon Oct 7, 2024
Great, all set!
eh2077 commentedon Oct 10, 2024
Requested in newdot
JmillsExpensify commentedon Oct 11, 2024
$250 approved for @eh2077