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
[Due for payment 2025-03-05] [$250] Categories - Default spend categories are missing when workspace is created offline #55994
Version Number: 9.0.91-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers):applausetester+28930@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Windows 11 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go offline.
Create a new workspace.
Go to workspace settings > Categories.
5 Click Settings.
Go online.
Expected Result:
In Step 5, Default spend categories will be available when the workspace is created offline.
Actual Result:
In Step 5, Default spend categories are not available when the workspace is created offline.
The categories only appear after returning online.
What changes do you think we should make in order to solve the problem?
We can set the policy.mccGroup optimistically in buildPolicyData to the value the BE is now setting and also revert it on failureData.
This is how the data BE is setting looks
Tested this and it's working normally. Looks like the tester is using the wrong button there.
Go to staging.new.expensify.com
Go offline.
Create a new workspace.
Go to workspace settings > Categories.
Click Settings. - THIS MAIN BUTTON DOESN'T CONTROL EACH CATEGORY'S SETTINGS
Go online.
You can see in the video that they later correctly tap into the category once they are online again. If they had tapped that at the start, it would have looked exactly the same.
In my testing, in which I am offline with no wifi or data, not simulated, the categories are all there and all settings are available.
changed the title [-]Categories - Default spend categories are missing when workspace is created offline[/-][+][$250] Categories - Default spend categories are missing when workspace is created offline[/+]on Jan 31, 2025
changed the title [-][$250] Categories - Default spend categories are missing when workspace is created offline[/-][+][Due for payment 2025-03-05] [$250] Categories - Default spend categories are missing when workspace is created offline[/+]on Feb 26, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.6-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@allgandalf@RachCHopkins@allgandalf 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: N/A this case was never considered to be implemented
[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: N/A
[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.
AFTER FILLING THIS OUT, be sure to remove the
and tags from this part of the checklist!!!!! -->
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Jan 29, 2025
Triggered auto assignment to @RachCHopkins (
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.FitseTLT commentedon Jan 30, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Open Categories - Default spend categories are missing when workspace is created offline
What is the root cause of that problem?
We don't set
policy.mccGroupoptimistically in when creating workspaces so It will only appear after the response ofOpenPolicyCategoriesPageAPIApp/src/libs/actions/Policy/Policy.ts
Lines 1746 to 1752 in 2e04450
What changes do you think we should make in order to solve the problem?
We can set the
policy.mccGroupoptimistically inbuildPolicyDatato the value the BE is now setting and also revert it on failureData.This is how the data BE is setting looks
we can also set the
pendingActionof the mccGroups toADDand reset it on successDataWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
write a test for buildPolicyData to assert we are setting the mccGroup value optimistically
What alternative solutions did you explore? (Optional)
RachCHopkins commentedon Jan 30, 2025
Tested this and it's working normally. Looks like the tester is using the wrong button there.
You can see in the video that they later correctly tap into the category once they are online again. If they had tapped that at the start, it would have looked exactly the same.
In my testing, in which I am offline with no wifi or data, not simulated, the categories are all there and all settings are available.
RachCHopkins commentedon Jan 31, 2025
Reopening this, I've worked out what the tester is trying to describe - the video doesn't exactly reflect what they are describing.
The issue is that the MCC category defaults are not available offline. In my testing, for one workspace, they also did not return on going online.
Expected results: The defaults should be listed both offline and online
Result: The defaults will not be listed offline, and may or may not appear when back online
[-]Categories - Default spend categories are missing when workspace is created offline[/-][+][$250] Categories - Default spend categories are missing when workspace is created offline[/+]melvin-bot commentedon Jan 31, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021885116611337715784
melvin-bot commentedon Jan 31, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf (
External)11 remaining items
[-][$250] Categories - Default spend categories are missing when workspace is created offline[/-][+][Due for payment 2025-03-05] [$250] Categories - Default spend categories are missing when workspace is created offline[/+]melvin-bot commentedon Feb 26, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 26, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.6-1 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-03-05. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 26, 2025
@allgandalf @RachCHopkins @allgandalf 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]
RachCHopkins commentedon Mar 5, 2025
@allgandalf you wanna do that checklist please?
allgandalf commentedon Mar 5, 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: N/A this case was never considered to be implemented
[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: N/A
[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.
AFTER FILLING THIS OUT, be sure to remove the
tags from this part of the checklist!!!!! -->-
- N/A
- Go offline > Create a new workspace.
- Go to workspace settings > Categories.
- Click Settings.
[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:
Verify Default spend categories are available.
Do we agree 👍 or 👎
RachCHopkins commentedon Mar 7, 2025
Payment Summary:
Upwork job here
RachCHopkins commentedon Mar 7, 2025
Contributors have been paid, the contracts have been completed, and the Upwork post has been closed.