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

[$250] Android - Scan - Red dot for uploading corrupt pdf is not shown in preview #42865

Closed
1 of 6 tasks
lanitochka17 opened this issue May 30, 2024 · 27 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. 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 Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented May 30, 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!


Version Number: 1.4.77
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch app
  2. Open a WS chat
  3. Submit a scan expense
  4. Enter all details manually
  5. Tap on receipt -- 3 dots -- replace
  6. Upload a corrupt pdf
  7. Navigate to WS chat

Expected Result:

Red dot for uploading corrupt pdf is shown in details page, similarly should be shown in WS chat preview

Actual Result:

Red dot for uploading corrupt pdf is shown in details page but not shown in WS chat preview

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

Bug6496640_1717095567344.Screenrecorder-2024-05-30-23-29-38-289_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fa2f0f6f81960fe9
  • Upwork Job ID: 1801397664241404221
  • Last Price Increase: 2024-06-27
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 30, 2024
Copy link

melvin-bot bot commented May 30, 2024

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

@lanitochka17
Copy link
Author

@mallenexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@melvin-bot melvin-bot bot added the Overdue label Jun 3, 2024
@mallenexpensify
Copy link
Contributor

Asking for pdf file here in #qa

@melvin-bot melvin-bot bot removed the Overdue label Jun 3, 2024
@kavimuru
Copy link

kavimuru commented Jun 3, 2024

@mallenexpensify
Copy link
Contributor

Thanks @kavimuru ! I'll try to upload tomorrow, we're having site issues meow

@melvin-bot melvin-bot bot added the Overdue label Jun 5, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Jun 10, 2024

@mallenexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@mallenexpensify
Copy link
Contributor

@twisterdotcom , can I send this your way since you have a physical device to test with? I'm going to order a pixel 6 or 7 for the bank so folks there can test going forward (cuz there are too many limitations or hoops to jump through with browserstack on bugs like this)

@melvin-bot melvin-bot bot removed the Overdue label Jun 11, 2024
@mallenexpensify mallenexpensify added the Needs Reproduction Reproducible steps needed label Jun 11, 2024
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@twisterdotcom
Copy link
Contributor

Trade ya for #43399

@mallenexpensify
Copy link
Contributor

Deal! Thanks @twisterdotcom

Copy link

melvin-bot bot commented Jun 13, 2024

@twisterdotcom this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Jun 13, 2024
@twisterdotcom
Copy link
Contributor

twisterdotcom commented Jun 13, 2024

This is so niche, but I agree it occurs.

Screenshot (14 Jun 2024 00_34_21)

@melvin-bot melvin-bot bot removed the Overdue label Jun 13, 2024
@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01fa2f0f6f81960fe9

@melvin-bot melvin-bot bot changed the title Android - Scan - Red dot for uploading corrupt pdf is not shown in preview [$250] Android - Scan - Red dot for uploading corrupt pdf is not shown in preview Jun 13, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

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

@twisterdotcom twisterdotcom added Weekly KSv2 and removed Needs Reproduction Reproducible steps needed Daily KSv2 labels Jun 13, 2024
@truph01
Copy link
Contributor

truph01 commented Jun 14, 2024

Proposal

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

We see red dot for uploading corrupt pdf is shown in details page but not shown in WS chat preview

What is the root cause of that problem?

When checking report preview errors, it's checking only the action errors

ReportUtils.hasActionsWithErrors(iouReportID);

The transaction errors are not checked.

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

In

function hasActionsWithErrors(reportID: string): boolean {

check transaction errors too because a transaction has error means the report action of that transaction also has error

function hasActionsWithErrors(reportID: string): boolean {
    const reportActions = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`] ?? {};

    const hasActionError = Object.values(reportActions).some((action) => !isEmptyObject(action.errors));

    if (hasActionError) {
        return true;
    }

    const transactions = TransactionUtils.getAllReportTransactions(reportID);

    const hasTransactionError = transactions.some((transaction) => !isEmptyObject(transaction.errors));

    return hasTransactionError;
}

transaction?.errorFields can also be checked.

Maybe we can separate the transactions check to a hasTransactionsWithErrors.

Looks like similar problem exists in the MoneyRequestPreview

const shouldShowRBR = hasNoticeTypeViolations || hasViolations || hasFieldErrors || (!isFullySettled && !isFullyApproved && isOnHold);

The transaction errors check can be added there also.

What alternative solutions did you explore? (Optional)

On a side note, the issue of the Scan corrupted PDF UX inconsistency in some places in the app will probably be addressed in the issue #43645, using the implementation like here. This issue will still need to be fixed even after the Scan corrupted UX is merged, because the root cause is differnt and there're other transaction errors too that will need to show RBR in MoneyRequestView, ReportPreview

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 14, 2024
Copy link

melvin-bot bot commented Jun 17, 2024

@twisterdotcom, @mkhutornyi Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Jun 17, 2024
@mkhutornyi
Copy link
Contributor

1 proposal to review

Copy link

melvin-bot bot commented Jun 20, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Jun 20, 2024
@twisterdotcom
Copy link
Contributor

Could we get this proposal reviewed, please, @mkhutornyi?

@melvin-bot melvin-bot bot removed the Overdue label Jun 20, 2024
@mkhutornyi
Copy link
Contributor

@truph01 thanks for the proposal. Why does this happen only on android? Or platforms are wrongly tagged in OP?

@truph01
Copy link
Contributor

truph01 commented Jun 21, 2024

@mkhutornyi It happens for all platforms.

Or platforms are wrongly tagged in OP?

So yes

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
@twisterdotcom
Copy link
Contributor

Okay @mkhutornyi is the proposal good enough, or should we wait longer? Going to downgrade to weekly given corrupted PDFs aren't exactly the mainline use case.

@melvin-bot melvin-bot bot removed the Overdue label Jun 24, 2024
@twisterdotcom twisterdotcom added Weekly KSv2 and removed Daily KSv2 labels Jun 24, 2024
Copy link

melvin-bot bot commented Jun 27, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@Krishna2323
Copy link
Contributor

@mkhutornyi @twisterdotcom, we will prevent uploading corrupt pdf's here .

Copy link

melvin-bot bot commented Jun 27, 2024

@twisterdotcom @mkhutornyi this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@twisterdotcom
Copy link
Contributor

Okay, this will be solved with #43645

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. 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 Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

8 participants