Skip to content
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

IOU - The paid IOU shows a message about the disabled category #34536

Closed
6 tasks done
lanitochka17 opened this issue Jan 15, 2024 · 4 comments
Closed
6 tasks done

IOU - The paid IOU shows a message about the disabled category #34536

lanitochka17 opened this issue Jan 15, 2024 · 4 comments
Assignees

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 15, 2024

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 and add 3 categories, add an employee to the policy.

Steps:

  1. Open https://staging.new.expensify.com/
  2. Log in to the employee's account
  3. Tap on the green plus button (FAB)
  4. Select Request money
  5. Select any currency and amount
  6. Click next
  7. Choose a WS room
  8. Click on "Show more"
  9. In the "Category" section, select any category
  10. Complete the IOU
  11. Open https://staging.expensify.com/
  12. Log in to the admin account
  13. Navigate to the Collect group policy settings
  14. In the category tab, disable the employee's selected category from step 9
  15. Open https://staging.new.expensify.com/
    in incognito mode.
  16. Log in as an administrator
  17. Go to the employee report and pay the IOU
  18. Under the employee's account, open the IOU details

Expected Result:

The message about the disabled category should disappear after IOU payment

Actual Result:

The paid IOU shows a message about the disabled category

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

Bug6343587_1705353489660.Recording__1087.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Jan 15, 2024
Copy link
Contributor

👋 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Jan 15, 2024

Triggered auto assignment to @deetergp (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@neonbhai
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

The paid IOU shows a message about the disabled category

What is the root cause of that problem?

This occurs as we will show a violation without checking if the Request is paid.



The only condition to show a violation is the canUseViolations beta flag:

{canUseViolations && <ViolationMessages violations={getViolationsForField('category')} />}

What changes do you think we should make in order

We should check if the Request isSettled before showing violations:

const shouldShowViolations = canUseViolations && !isSettled;

Then here:

{shouldShowViolations && <ViolationMessages violations={getViolationsForField('category')} />}

We will do the same for other fields.

@cead22 cead22 assigned cead22 and unassigned deetergp Jan 16, 2024
@cead22
Copy link
Contributor

cead22 commented Jan 16, 2024

The message about the disabled category should disappear after IOU payment

This is not the expected behavior, so closing. Adding the source of expected behavior can be useful when logging bugs

Violations seem to be working correctly here, and they're behind a beta, so even if this wasn't the expected behavior, we shouldn't block on violations for the time being

@cead22 cead22 closed this as completed Jan 16, 2024
@cead22 cead22 added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants