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
[HOLD for payment 2025-01-22] [$500] Expense - Submit button appears for archived workspace chat if delayed submission is enabled #49169
Version Number: 9.0.33-4 Reproducible in staging?: Y
**Reproducible in production?:**Y Email or phone of affected tester (no customers):nathanmulugetatesting+1469@gmail.com Issue reported by: Applause Internal Team
Action Performed:
Navigate to staging.new.expensify.com
Sign up with a new Gmail account
Create two workspaces
Invite a member on the second workspace
Enable workflows
Enable delayed submission and make the frequency "Manually"
Create an expense as the employee
Delete the workspace as the admin
Expected Result:
Submit button doesn't show on the archived workspace chat on the expense
Actual Result:
Submit button shows on both the employee's and admin's archived workspace chat and clicking on the button results in an error
Additional Expected Behavior:
When a workspace is deleted, no expense report should show Submit, Approve or Pay action buttons.
Additionally Submit expense & Track expense options should be hidden from the expense report’s create menu (i.e the menu where Add attachment etc lives).
@johncschuster 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
When a workspace is deleted, no expense report should show Submit, Approve or Pay action buttons.
For approve and pay button we don't have to make any change since we already hiding the buttons when the workspace is archived.
Additionally Submit expense & Track expense options should be hidden from the expense report’s create menu (i.e the menu where Add attachment etc lives).
Currently the composer with all the submit, track expense option is closed when workspace chat is archived
What alternative solutions did you explore? (Optional)
Hi @abzokhattab. Writing few details takes time and make a difference in proposal submission time, and there seems to be a little difference between what you have suggested at first which is disabling the button (we dont disable the submit button ) by pointing a permalink to shouldDisableApproveButton, and what you suggested after the edit. That was why I raised the question. I have no ill intention towards you in saying that though🙏.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.85-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Ollyws@johncschuster@Ollyws The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production
2b. Reported on staging (deploy blocker)
2c. Reported on both staging and production
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
1. Create a workspace from User A and enable workflow and manual submission
2. Invite User B
3. Submit an expense report from User B's account
4. Remove User B from the workspace using User A's account
5. From User B side open the archive workspace chat
6. Open the expense report you submitted in (3)
7. Verify that composer is visible (not hidden) and you can comment, all context menu work correctly like reply in thread, react.
8. Verify that you can edit the expense fields like date, receipt, description, merchant, amount.
9. Verify that you cannot submit (submit button doesn't appear)
10. Verify that you cannot create expense on the archived expense report.
Activity
melvin-bot commentedon Sep 13, 2024
Triggered auto assignment to @johncschuster (
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.IuliiaHerets commentedon Sep 13, 2024
@johncschuster 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
abzokhattab commentedon Sep 13, 2024
Edited by proposal-police: This proposal was edited at 2024-09-13 12:03:09 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Submit button appears for archived workspace chat if delayed submission is en bled
What is the root cause of that problem?
we dont disable the submit button if the workspce is archived here
App/src/components/MoneyReportHeader.tsx
Line 126 in eb5a569
App/src/components/ReportActionItem/ReportPreview.tsx
Line 185 in 4817f9d
What changes do you think we should make in order to solve the problem?
we should add another condition that the workspace is not deleted above using the
isArchivedReportvaror it could be added to the isOpenExpenseReport directly (to follow the same concept as in the isOpenTaskReport function) :
POC
Screen.Recording.2024-09-13.at.14.21.13.mov
What alternative solutions did you explore? (Optional)
etCoderDysto commentedon Sep 13, 2024
Edited by proposal-police: This proposal was edited at 2024-10-17 10:27:58 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - Submit button appears for archived workspace chat if delayed submission is enabled
What is the root cause of that problem?
For submit button
We display the button here even if the report is archived
here
App/src/components/MoneyReportHeader.tsx
Line 126 in 00bc167
And here
App/src/components/ReportActionItem/ReportPreview.tsx
Line 187 in 00bc167
For Approve button we are already hiding the button when workspace is archived here
Here we check if the workspace is archived
App/src/libs/actions/IOU.ts
Line 6971 in 987ff1b
Then we make
shouldShowApproveButtonbutton false if it is archived hereApp/src/components/ReportActionItem/ReportPreview.tsx
Line 328 in 987ff1b
3. For Pay button we are already hiding the button if the workspace is archived
Here we check if workspace is achieved
App/src/libs/actions/IOU.ts
Line 6985 in 987ff1b
And we make
canIOUBePaidfalse if the workspace is archivedApp/src/components/ReportActionItem/ReportPreview.tsx
Lines 325 to 332 in 987ff1b
What changes do you think we should make in order to solve the problem?
here
And here
For approve and pay button we don't have to make any change since we already hiding the buttons when the workspace is archived.
Currently the composer with all the submit, track expense option is closed when workspace chat is archived
What alternative solutions did you explore? (Optional)
etCoderDysto commentedon Sep 13, 2024
Note
A kind reminder for C+:
The fist section of the first proposal's permalink edit that points to shouldShowSubmitButton comes after my proposal. Prior to that it pointed to shouldDisableApproveButton.
Screenshot of time of the first propsal
Screenshot of time my proposal
etCoderDysto commentedon Sep 13, 2024
Hi @abzokhattab. Writing few details takes time and make a difference in proposal submission time, and there seems to be a little difference between what you have suggested at first which is disabling the button (we dont disable the submit button ) by pointing a permalink to shouldDisableApproveButton, and what you suggested after the edit. That was why I raised the question. I have no ill intention towards you in saying that though🙏.
Thanks!
dominictb commentedon Sep 14, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
App/src/components/ReportActionItem/ReportPreview.tsx
Line 187 in 00bc167
we don't check whether the report is archived, pending deletion or encountering an error.
What changes do you think we should make in order to solve the problem?
All of these conditions can be handled in:
App/src/libs/ReportUtils.ts
Line 6693 in 00bc167
App/src/components/MoneyReportHeader.tsx
Line 126 in 00bc167
and
App/src/components/ReportActionItem/ReportPreview.tsx
Line 187 in 00bc167
What alternative solutions did you explore? (Optional)
melvin-bot commentedon Sep 16, 2024
@johncschuster Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Sep 17, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021836147581047135142
109 remaining items
melvin-bot commentedon Jan 15, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 15, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.85-4 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 2025-01-22. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 15, 2025
@Ollyws @johncschuster @Ollyws The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
johncschuster commentedon Jan 15, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
johncschuster commentedon Jan 15, 2025
Payment Summary
Contributor: @FitseTLT paid $500 via Upwork
Contributor+: @Ollyws owed $500 via NewDot
johncschuster commentedon Jan 22, 2025
@Ollyws can you complete the BZ Checklist above?
johncschuster commentedon Jan 22, 2025
Payment has been issued to @FitseTLT. Once the checklist is complete, please go ahead and request payment via ND, @Ollyws. Thank you!
Ollyws commentedon Jan 22, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Ollyws commentedon Jan 22, 2025
Requested in ND.
johncschuster commentedon Jan 23, 2025
Thanks, @Ollyws! We're good to close this up!
garrettmknight commentedon Jan 29, 2025
$500 approved for @Ollyws