-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2024-12-16] [HOLD for payment 2024-11-11] [$250] Categories -Category name for spend is not updated offline & a new category is created instead #50563
Comments
Triggered auto assignment to @bfitzexpensify ( |
@bfitzexpensify 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/~021844365273557975639 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
Edited by proposal-police: This proposal was edited at 2024-10-10 13:52:55 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?Update optimistic data for const policyCategories = Object.keys(allPolicyCategories.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]);
const mccGroup = policy.mccGroup;
const updatedMccGroups = lodashCloneDeep(mccGroup);
Object.values(mccGroup).forEach((group) => {
if (policyCategories.includes(group.category)) {
updatedMccGroups[group.groupID] = policyCategory.newName;
}
})
...
optimisticData: [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
mccGroup: {
...updatedMccGroups,
}
},
},
],
failureData: [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
mccGroup,
},
},
] We might need to update mccGroup's |
Edited by proposal-police: This proposal was edited at 2024-10-10 17:25:54 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Category name for spend is not updated offline & a new category is created instead What is the root cause of that problem?We do not update the category in the App/src/libs/actions/Policy/Category.ts Line 593 in d93f29a
App/src/libs/actions/Policy/Category.ts Line 637 in d93f29a
What changes do you think we should make in order to solve the problem?We must update the category in the //src/libs/actions/Policy/Category.ts#L546
+ const mccGroup = policy?.mccGroup ?? [];
+ const updateMCCGroup = lodashCloneDeep(mccGroup);
//src/libs/actions/Policy/Category.ts#L600
value: {
rules: {
approvalRules: updatedApprovalRules,
expenseRules: updatedExpenseRules,
},
+ mccGroup: CategoryUtils.getCategoryMccGroup(updateMCCGroup, policyCategory.oldName, policyCategory.newName),
},
//src/libs/actions/Policy/Category.ts#L641
value: {
rules: {
approvalRules,
},
+ mccGroup: CategoryUtils.getCategoryMccGroup(updateMCCGroup, policyCategory.oldName, policyCategory.newName)
},
// .src/libs/CategoryUtils.ts#L60
+ function getCategoryMccGroup(mccGroup, oldCategoryName: string, newCategoryName: string) {
+ for (const key in mccGroup) {
+ if (mccGroup[key].category === oldCategoryName) {
+ mccGroup[key].category = newCategoryName;
+ mccGroup[key].pendingAction = 'update';
+ }
+ }
+ return mccGroup;
+} POC
Screen.Recording.2024-10-11.at.01.27.29.mp4 |
@eVoloshchak, @bfitzexpensify Huh... This is 4 days overdue. Who can take care of this? |
Couple of proposals ready for review @eVoloshchak |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@eVoloshchak, @bfitzexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Triggered auto assignment to @youssef-lr, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@youssef-lr I look forward to receiving your assignment |
@eVoloshchak, @youssef-lr, @huult, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
same above |
@eVoloshchak, @youssef-lr, @huult, @bfitzexpensify Still overdue 6 days?! Let's take care of this! |
@eVoloshchak Please review my pull request. Thank you. |
@eVoloshchak, @youssef-lr, @huult, @bfitzexpensify Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
@eVoloshchak Please review my pull request. Thank you. |
@eVoloshchak, @youssef-lr, @huult, @bfitzexpensify 12 days overdue. Walking. Toward. The. Light... |
@eVoloshchak Could you review the pull request so it can be completed? It has been open for 3 weeks and involves a small change, so your prompt review would be appreciated. |
Will give this a final round of testing today, apologies for the delay |
@eVoloshchak, @youssef-lr, @huult, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@eVoloshchak, @youssef-lr, @huult, @bfitzexpensify Still overdue 6 days?! Let's take care of this! |
Waiting for @youssef-lr to review. #51927 |
@eVoloshchak, @youssef-lr, @huult, @bfitzexpensify 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it! |
@eVoloshchak, @youssef-lr, @huult, @bfitzexpensify 12 days overdue now... This issue's end is nigh! |
The pull request is already merged into the staging branch |
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.72-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 2024-12-16. 🎊 For reference, here are some details about the assignees on this issue:
|
@eVoloshchak @bfitzexpensify @eVoloshchak 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] |
Payment complete to @huult. @eVoloshchak, please complete the BZ checklist and I'll post the payment summary for the C+ work. |
Bumping this @eVoloshchak |
Regression Test Proposal
Do we agree 👍 or 👎 |
Thanks! Payment summary: @eVoloshchak due $250 for C+ work via ND manual request. |
$250 approved for @eVoloshchak |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.47-1
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
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Travel category will gray out and the name is updated when the category is updated offline
Actual Result:
Travel category is not grayed out and the name is not updated
A new category with the updated name is created down in the list
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6630360_1728539282760.20241010_134219.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @eVoloshchakThe text was updated successfully, but these errors were encountered: