Skip to content

[Violations] [$1000] Violations are not shown as approver #36441

Closed

Description

@m-natarajan

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:

  1. Go to OldDot staging.expensify.com and open or create a Collect policy
  2. Make tags required for the policy
  • Go to Settings > [Workspace] > Tags
  • Enable "People must tag expenses"
  • Add a tag
  1. Set violations for category as to be required
  2. Go to the policy page
  3. In the JS console with the policy open do:

p = Policy.getCurrent();
p.policy.isPolicyExpenseChatEnabled = "true";
p.save();

  1. Invite a user to the policy as employee
  2. As an employee sign in to the NewDot, create a expense report without category and tag set
  3. Open the report as approver logged in to NewDot

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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Screen Shot 2024-02-13 at 5 01 52 PM

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ebca0f5b1a041068
  • Upwork Job ID: 1757526242287419392
  • Last Price Increase: 2024-02-22

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 13, 2024
  2. melvin-bot commented on Feb 13, 2024

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. changed the title [-]Violations are not shown as approver[/-] [+][$500] Violations are not shown as approver[/+] on Feb 13, 2024
  4. melvin-bot commented on Feb 13, 2024

    @melvin-bot
  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 13, 2024
  6. melvin-bot commented on Feb 13, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External)

  7. self-assigned this
    on Feb 13, 2024
  8. brandonhenry commented on Feb 15, 2024

    @brandonhenry
    Contributor

    Proposal

    Please 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?

    • Review the expense report validation flow to ensure that the checks for required fields are triggered when an approver reviews a report.
    • Update the UI components responsible for displaying the error messages to approvers to ensure they are activated correctly when violations are detected.
    • Ensure that the state management for the report correctly reflects the presence of violations and binds this state to the UI elements for error message display.
    • Conduct tests on all supported platforms to ensure that upon opening a report with set violations, the approver is presented with the appropriate error messages.

    What alternative solutions did you explore? (Optional)

    • An alternative solution could be to implement a pre-approval validation step, prompting the employee to correct the violations before submission to the approver. However, this may not be desirable as it shifts the responsibility from the approver to the employee.
  9. bfitzexpensify commented on Feb 16, 2024

    @bfitzexpensify
    Contributor

    @cead22 is this something you're planning on working on yourself, or is this something that contributors can tackle?

  10. 51 remaining items

  11. melvin-bot commented on Mar 18, 2024

    @melvin-bot

    @cead22, @parasharrajat, @bfitzexpensify Eep! 4 days overdue now. Issues have feelings too...

  12. changed the title [-][$1000] Violations are not shown as approver[/-] [+][Violations][$1000] Violations are not shown as approver[/+] on Mar 18, 2024
  13. moved this to Release 1: Spring 2024 (May) in [#whatsnext] #wave-collecton Mar 18, 2024
  14. changed the title [-][Violations][$1000] Violations are not shown as approver[/-] [+][Violations] [$1000] Violations are not shown as approver[/+] on Mar 18, 2024
  15. moved this to Release 1: Spring 2024 (May) in #expensify-bugson Mar 21, 2024
  16. JmillsExpensify commented on Mar 26, 2024

    @JmillsExpensify
    Contributor

    Nice! With both of those merged and on production, can we close this issue now?

  17. cead22 commented on Mar 26, 2024

    @cead22
    Contributor

    Yup!

  18. moved this from Release 1: Spring 2024 (May) to Done in #expensify-bugson Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions