-
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] [$1000] Violations are not shown as approver #36441
Comments
Triggered auto assignment to @bfitzexpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~01ebca0f5b1a041068 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Approvers are not seeing the expected error messages for violation of expense report policies, specifically when category and tag settings are required but not set by the employee on the report. What is the root cause of that problem?The root cause may involve the policy enforcement logic within the approver's view. It appears the validation checks that trigger error messages for missing categories or tags are not executing correctly, or the UI is not displaying the results of these checks as it should. What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
|
@cead22 is this something you're planning on working on yourself, or is this something that contributors can tackle? |
Contributors can tackle it, I just assigned myself so I can be the reviewer of the PR since I've been leading violations and am familiar with the coe |
Sweet - OK, awaiting proposals. |
Thanks @brandonhenry for submitting a proposal. Although your proposal outlines the steps, it is missing technical details. Could you please update it? Please check old issues for example proposals. |
Was going to update my proposal here, but I am having a really hard time reproducing this issue. I'm not able to see this details request screen in ND. I'm also not able to access any workspace that supports tags inside of ND. There's no way to view a workspace other than free workspace in ND in prod right now. I don't think this is an urgent issue but maybe thats just me |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@m-natarajan Could you please update the steps so that it explains @brandonhenry queries #36441 (comment) cc: @bfitzexpensify |
Posted for help in the #qa channel |
I have edited the OP. Please check if this helps. |
Thanks @kavimuru! |
No full proposals after a week, let's increase the bounty |
Upwork job price has been updated to $1000 |
Updated ProposalProblem StatementApprovers are not seeing the expected error messages for violation of expense report policies, specifically when category and tag settings are required but not set by the employee on the report. Root CauseThe root cause of the problem is that the
Proposed Changes
const getErrorForField = useCallback(
(field: ViolationField, data?: OnyxTypes.TransactionViolation['data']) => {
const fieldChecks: Partial<Record<ViolationField, {isError: boolean; translationPath: TranslationPaths}>> = {
amount: {
isError: transactionAmount === 0,
translationPath: 'common.error.enterAmount',
},
merchant: {
isError: !isSettled && !isCancelled && isPolicyExpenseChat && isEmptyMerchant,
translationPath: 'common.error.enterMerchant',
},
date: {
isError: transactionDate === '',
translationPath: 'common.error.enterDate',
},
category: {
isError: !transactionCategory,
translationPath: 'common.error.selectCategory',
},
tag: {
isError: !transactionTag,
translationPath: 'common.error.selectTag',
},
};
// .. code is the same
},
[transactionAmount, isSettled, isCancelled, isPolicyExpenseChat, isEmptyMerchant, transactionDate, transactionCategory, transactionTag, hasErrors, canUseViolations, hasViolations, translate, getViolationsForField],
); |
Is this still reproducible? |
Asked QA to retest in Slack |
@cead22 @parasharrajat @bfitzexpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks! |
@cead22 @parasharrajat @bfitzexpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks! |
QA are still able to reproduce @cead22 Recording.1758.mp4 |
Thanks, I think I found the bug |
There are two things happening here:
I'll fix 1. for this issue, and 2. as part of #37013 |
PR submitted for item number 1. above |
@cead22 @parasharrajat @bfitzexpensify this issue is now 4 weeks old and preventing us from maintaining WAQ. This should now be your highest priority. Please post below what your plan is to get a PR in review ASAP. Thanks! |
@cead22, @parasharrajat, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
PR submitted for item number 2. above |
@cead22, @parasharrajat, @bfitzexpensify Eep! 4 days overdue now. Issues have feelings too... |
Nice! With both of those merged and on production, can we close this issue now? |
Yup! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.41-2
Reproducible in staging?: y
Reproducible in production?: y
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: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1707848268463619
Action Performed:
p = Policy.getCurrent();
p.policy.isPolicyExpenseChatEnabled = "true";
p.save();
Expected Result:
Error message for violations are shown
Actual Result:
Not seeing violations as approver
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: