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

Report field - Show violation on single transaction expense reports #46215

Closed
6 tasks done
m-natarajan opened this issue Jul 25, 2024 · 13 comments
Closed
6 tasks done

Report field - Show violation on single transaction expense reports #46215

m-natarajan opened this issue Jul 25, 2024 · 13 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Monthly KSv2 Reviewing Has a PR in review

Comments

@m-natarajan
Copy link

m-natarajan commented Jul 25, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Found when validating #44139
Version Number: 9.0.12.0
Reproducible in staging?: y
Reproducible in production?: no
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:

Precondition:

  • Workspace is under Control plan.
  • Report fields feature is enabled.
  • Text type report field is added and it has no initial value.
  • The workspace has no unsettled expense.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit a manual expense.
  4. Go to expense report.
  5. Note that report field violations do not show up.
  6. Submit another manual expense.
  7. Note that report field violation shows up.
  8. Go to Troubleshoot > Clear cache and restart > Reset and restart.
  9. Go to expense report.
  10. Note that report field violations disappear..

Expected Result:

In Step 5, report field violation will show up after submitting the first expense.
In Step 10, report field violation will persist after clearing cache and restarting app.

Actual Result:

In Step 5, report field violation does not show up after submitting the first expense.
It only shows up after submitting the second expense (Step 7).
In Step 10, report field violation disappears after clearing cache and restarting app.

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

Bug6552777_1721919071237.20240725_224410.mp4

View all open jobs on GitHub

@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 2024

Triggered auto assignment to @AndrewGable (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Jul 25, 2024

Triggered auto assignment to @kadiealexander (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.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jul 25, 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.

@AndrewGable
Copy link
Contributor

@thienlnam @jnowakow @war-in @blazejkustra @allroundexperts - Can you check into this?

@AndrewGable AndrewGable assigned thienlnam and unassigned AndrewGable Jul 25, 2024
@thienlnam
Copy link
Contributor

Doesn't need to be a blocker since this is a new feature - cc @jnowakow

@thienlnam thienlnam added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Jul 25, 2024
@war-in
Copy link
Contributor

war-in commented Jul 26, 2024

In Step 5, report field violation does not show up after submitting the first expense.

Hi 👋 I think @jnowakow told me that fields haven't shown up for single expenses at the time he was implementing violations. That's why he didn't implement this functionality at the time.

In Step 10, report field violation disappears after clearing cache and restarting app.

It depends on the backend response. If the backend doesn't return the correct data RBRs won't be shown. @thienlnam please share your thoughts here 🙏

@thienlnam
Copy link
Contributor

Heyo, thanks for the context.

For this issue let's handle the single expense reports since they now show the report fields.

The violations coming from the BE is still in the works, pending on other issue so that is still expected

@thienlnam thienlnam changed the title Report field - Violation only shows up after submitting 2nd expense & disappears after resetting app Report field - Show violation on single transaction expense reports Jul 26, 2024
@melvin-bot melvin-bot bot added the Overdue label Jul 29, 2024
@war-in
Copy link
Contributor

war-in commented Jul 29, 2024

I think I found the cause of the issue: #46425

When the first expense was created we dealt with an optimistic IOU report and there was no fieldList field in it. If the fieldList is undefined we can't tell which fields were violated.

I added fieldList to the OptimisticIOUReport and OptimisticExpenseReport types. That way we can optimistically set fieldList 🎉

I'll mark PR as ready for review tomorrow because I need to test it and record videos

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 30, 2024
@war-in
Copy link
Contributor

war-in commented Jul 31, 2024

PR is ready for C+ review :)

cc @allroundexperts

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Aug 23, 2024
Copy link

melvin-bot bot commented Aug 23, 2024

This issue has not been updated in over 15 days. @thienlnam, @kadiealexander, @war-in eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@allroundexperts
Copy link
Contributor

Can I get assigned here since I reviewed the PR?

@thienlnam
Copy link
Contributor

Yeah, but this was a regression from #44139

@allroundexperts
Copy link
Contributor

My bad. This can be closed. You're correct @thienlnam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Monthly KSv2 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

6 participants