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

[$500] Request –Red dot is not displayed in LHN as Admin if upload image of blurry receipt as employee #32524

Closed
2 of 6 tasks
lanitochka17 opened this issue Dec 5, 2023 · 12 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 5, 2023

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.8-0
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: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in
  3. As the employee, navigate to the workspace chat
  4. Select Request money > Scan
  5. Upload a image of a blurry receipt
  6. Complete the money request
  7. After the scanned receipt shows a failure
  8. Login as the workspace admin
  9. Navigate to the workspace chat with the employee
  10. Click on the preview to navigate to the report conversation

Expected Result:

Red dot is displayed in LHN as Admin if upload image of blurry receipt as employee

Actual Result:

Red dot is not displayed in LHN as Admin if upload image of blurry receipt as employee

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

Bug6302320_1701806743441.Red_dot_is_not_displayed_in_LHN.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012df105c35490c2a4
  • Upwork Job ID: 1732134376158715904
  • Last Price Increase: 2023-12-05
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 5, 2023
@melvin-bot melvin-bot bot changed the title Request –Red dot is not displayed in LHN as Admin if upload image of blurry receipt as employee [$500] Request –Red dot is not displayed in LHN as Admin if upload image of blurry receipt as employee Dec 5, 2023
Copy link

melvin-bot bot commented Dec 5, 2023

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

Copy link

melvin-bot bot commented Dec 5, 2023

Job added to Upwork: https://www.upwork.com/jobs/~012df105c35490c2a4

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 5, 2023
Copy link

melvin-bot bot commented Dec 5, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 5, 2023

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

@erichasinternet
Copy link

Proposal

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

When logged in as a workspace admin, a red dot is not displayed in LHN if an employee uploads a blurry/invalid receipt.

What is the root cause of that problem?

Existing LHN code does not include logic to check for missing smartscan fields.
We check for brickroad errors here, which is why we see a red dot in the employee LHN view and not the workspace admin view.

What changes do you think we should make in order to solve the problem?

In the video @lanitochka17 shared we can see that the red dot is displayed in the workspace admin's report preview, as expected. We check for missing smartscan fields in the report preview, but not the LHN.

To address this issue, we can integrate the existing hasMissingSmartscanFields check into the LHN code.

    const hasBrickError = hasFieldErrors || optionItem.brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR;
    const hasFieldErrors = ReportUtils.hasMissingSmartscanFields(props.reportID);
    const hasErrors = hasBrickError || hasFieldErrors;

We can ensure that the red dot is appropriately displayed by adding hasFieldErrors and hasErrors, then replacing hasBrickError in the react code with the more comprehensive hasErrors.

Screenshot showing bugfix:

Screenshot 2023-12-05 at 4 30 59 PM

@tienifr
Copy link
Contributor

tienifr commented Dec 6, 2023

Proposal

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

Request –Red dot is not displayed in LHN as Admin if upload image of blurry receipt as employee

What is the root cause of that problem?

We don't inject the scan error into reportActionErrors if ownerAccountID !== currentUserAccountID

That why the red dot is not shown in Admin

What changes do you think we should make in order to solve the problem?

Remove this condition report.ownerAccountID === currentUserAccountID

We can consider to remove parentReportAction.actorAccountID === currentUserAccountID in here

@alexpensify
Copy link
Contributor

alexpensify commented Dec 6, 2023

@c3024 when you get a chance, can you review the proposals? Thanks!

@c3024
Copy link
Contributor

c3024 commented Dec 7, 2023

This is expected behaviour. LHN shows red dot only for the payee.

@melvin-bot melvin-bot bot added the Overdue label Dec 11, 2023
Copy link

melvin-bot bot commented Dec 11, 2023

@alexpensify, @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@alexpensify
Copy link
Contributor

@c3024 are you suggesting that we close this issue because it's expected behaviour?

@melvin-bot melvin-bot bot removed the Overdue label Dec 11, 2023
@c3024
Copy link
Contributor

c3024 commented Dec 12, 2023

Sorry for being not clear. Yes, I am suggesting that we close this issue because it's expected behaviour.

@alexpensify
Copy link
Contributor

All good, I wanted to make sure. Based on this feedback, I'm going to close this one.

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

5 participants