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 2024-07-10] [$250] Category - "Category no longer valid" shows up briefly after changing amount #43767
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Hey @OfstadC, It's easily reproducible on staging. Try it with this precondition.
Precondition: "Members must categorize all expenses" in Categories is enabled.
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@allgandalf] The PR that introduced the bug has been identified. Link to the PR:
[@allgandalf] 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:
[@allgandalf] A discussion in #expensify-bugs 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:
[@allgandalf] Determine if we should create a regression test for this bug.
[@allgandalf] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
A discussion in #expensify-bugs 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
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition : "Members must categorize all expenses" in Categories is enabled.
Go to staging.new.expensify.com
Go to workspace chat.
Submit an expense with category.
Go to transaction thread.
Click Amount.
Change amount and save it.
Verify that there is no violation under Category after changing amount because Category is already selected.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Jun 14, 2024
Triggered auto assignment to @OfstadC (
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.izarutskaya commentedon Jun 14, 2024
We think this issue might be related to the #collect project.
Nodebrute commentedon Jun 14, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Category no longer valid" shows up briefly after changing amount
What is the root cause of that problem?
We are not passing
policyCategorieshereApp/src/pages/iou/request/step/IOURequestStepAmount.tsx
Line 305 in f0b6355
so in here policyCategories will be
nullApp/src/libs/actions/IOU.ts
Line 5240 in 07b6b24
So that's why when here we check for
policyCategories?.[categoryKey]?.enabledit will be undefinedApp/src/libs/Violations/ViolationsUtils.ts
Line 190 in 07b6b24
What changes do you think we should make in order to solve the problem?
We should pass
policyCategorieshereApp/src/pages/iou/request/step/IOURequestStepAmount.tsx
Line 305 in f0b6355
Additionally we can also pass
policyTagsWe can do something like this
Note: This is just pseudocode.
We can also fix other instances of this to ensure we are passing all the data.
What alternative solutions did you explore? (Optional)
MelvinBot commentedon Jun 14, 2024
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
OfstadC commentedon Jun 14, 2024
I'm not able to reproduce on staging
I've tried different currencies, having a tag field, no tag field. Clicking in to edit the expense a few different ways - but I never see the category error
Most recent attempt:
https://github.com/Expensify/App/assets/11722379/90d898f4-5194-489b-bf8b-c3b11e0f5a27
Nodebrute commentedon Jun 14, 2024
Hey @OfstadC, It's easily reproducible on staging. Try it with this precondition.
Precondition: "Members must categorize all expenses" in Categories is enabled.
OfstadC commentedon Jun 14, 2024
Let me give it another shot! 😃
OfstadC commentedon Jun 14, 2024
I missed the "...must categorize all expenses" detail 🤦♀️ . It is very reproducible 😅

41 remaining items
melvin-bot commentedon Jul 3, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
OfstadC commentedon Jul 9, 2024
@allgandalf Could you please update this today based on the checklist? Thank you! 😃
allgandalf commentedon Jul 10, 2024
The PR that introduced the bug has been identified. Link to the PR: Client-side violations for money request updates #34402
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: https://github.com/Expensify/App/pull/34402/files#r1671860609
A discussion in #expensify-bugs 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
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Proposal
Do we agree 👍 or 👎
OfstadC commentedon Jul 10, 2024
Payment Summary:
Contributor: @allgandalf paid $250 via Upwork
Contributor: @truph01 paid $250 via Upwork
OfstadC commentedon Jul 11, 2024
Leaving this open until regression testing is complete
OfstadC commentedon Jul 15, 2024
Same - waiting on regression testing
melvin-bot commentedon Jul 15, 2024
@deetergp, @OfstadC, @allgandalf, @truph01 Eep! 4 days overdue now. Issues have feelings too...
allgandalf commentedon Jul 15, 2024
Chill a little melvin
OfstadC commentedon Jul 16, 2024
I'm actually going to close this out. but I'll note here if the regression testing yields anything 😄