-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Violations] [MEDIUM] IOU - The disabled category message does not disappear immediately after the change is made #34541
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Triggered auto assignment to @tylerkaraszewski ( |
Not a blocker, new feature |
ProposalPlease re-state the problem that we are trying to solve in this issue.The What is the root cause of that problem?We do not optimistically remove the category violation when updating the Money Request's category. What changes do you think we should make in order to solve the problem?When editing a money request, if the changes contain category, along with updating the recently used category, we should remove the category violation from this transaction's Onyx entry: It can be done like this (added a concern at the end): const transactionViolations = allTransactionViolations[`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`];
optimisticData.push({
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`,
value: transactionViolations.filter((violation) => violation.name === 'categoryOutOfPolicy'),
}); Lines 2342 to 2352 in c13c497
Also, we need to introduce a BE change to update the Concern: IMO, it's quite risky to operate an Onyx entry that holds an array, because it doesn't support the What alternative solutions did you explore? (Optional) |
@cead22 is making lots of changes to violations like this so we should be ware we dont waste energy and money on something that will be changed by his work |
Thanks for raising this in expensify-open-source. For context, this was discussed quite a bit and we landed on using the array because this array is primarily set from the backend, and the violations array is never too big that it should cause performance issues. That said, we do set some violations from the front end in I'm going to move this issue to the violations project and take it internally with Infinite Red cc @lindboe @trevor-coleman please comment for assignment |
I believe this is the same issue as https://github.com/Expensify/Expensify/issues/361948, but I'll make sure and get them resolved |
For categories and tags, yes, but for amount for instance, no. We have some backend commands updating money requests that should be sending down the updated violation data, and they currently aren't |
Just FYI that we have this potentially dupe issue - #34945 |
I'll look into this today |
No updates yet |
No updates |
No update on this one, though I agree with it being polish |
I'm not sure if this is reproducible anymore (and the site is kinda shaky right now to test), but I think this is mostly something we'll need to take into account when moving violations to auth. Specifically, we need to make sure that when changes are made to policies -- and other things that can affect violations like domain security groups, that we somehow update the affected transactions and their corresponding violations in real-time in all clients |
Noted, should we move this issue out of #wave-control then? Or keep it here, pending the completion of 1:1:1 for violations in #newdot-quality? |
Up to you -- you probably know better. I'm good with either |
In the doc to implement violations in auth we're discussing whether re-fetching violations, which will be necessary in some cases like this (as well as others) so violations update in real-time. If we agreed on leaving that out of scope for that project, I'll close this, and we can solve these issues as they come up when user start experiencing them |
We have no pushback on leaving this out of the scope of that doc, so closing this |
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: 1.4.25-1
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Preconditions:
In OldDot under admin, create a Collect group policy, enable Categories, add 3 Categories, add an employee to the policy.
Expected Result:
The message about a disabled category should immediately disappear after selecting an enabled category
Actual Result:
The disabled category message does not disappear immediately after selecting an enabled category
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6343627_1705355438570.Recording__1091.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: