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

[HOLD for payment 2023-09-18] [$500] Dev: console error if we open RHN page directly #26561

Closed
1 of 6 tasks
kavimuru opened this issue Sep 2, 2023 · 39 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed

Comments

@kavimuru
Copy link

kavimuru commented Sep 2, 2023

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


Action Performed:

  1. Try to open direct link of RHN(for eg, http://localhost:8082/settings)
  2. Observe the console error

Expected Result:

Should not occur console error
Actual Result:
Error Failed prop type: The prop isBlockedFromConciergeis marked as required inAttachmentPickerWithMenuItems, but its value is undefined. occurs

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: DEV
Reproducible in staging?: dev
Reproducible in production?: dev
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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-08-26.at.00.20.43.mov

Expensify/Expensify Issue URL:
Issue reported by: @Pujan92
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692985306887049

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013c4503a94278a1ad
  • Upwork Job ID: 1699435322866675712
  • Last Price Increase: 2023-09-06
  • Automatic offers:
    • situchan | Reviewer | 26527992
    • Pujan92 | Contributor | 26527994
    • Pujan92 | Reporter | 26527998
@kavimuru kavimuru added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 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

@kavimuru
Copy link
Author

kavimuru commented Sep 2, 2023

Proposal from @Pujan92

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

Console error for isBlockedFromConcierge passed undefined but it’s required prop

What is the root cause of that problem?

In PR we added prop isBlockedFromConcierge required in AttachmentPickerWithMenuItems & ComposerWithSuggestions components. But from ReportActionCompose it gets passed undefined when we directly open the RHN screen.

const isBlockedFromConcierge = useMemo(() => ReportUtils.chatIncludesConcierge(report) && User.isBlockedFromConcierge(blockedFromConcierge), [report, blockedFromConcierge]);

Bcoz by the time the report gets loaded it has a default value {reportID: ‘0’}, so condition ReportUtils.chatIncludesConcierge(report) returns undefined, with that undefined && false returns undefined and issue persist.

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

We need to update the condition to make sure it will return a boolean value instead of undefined.

App/src/libs/ReportUtils.js

Lines 809 to 811 in 57603a0

function chatIncludesConcierge(report) {
return report.participantAccountIDs && _.contains(report.participantAccountIDs, CONST.ACCOUNT_ID.CONCIERGE);
}

!_.isEmpty(report.participantAccountIDs)

OR
We can use double negate or Boolean constructor to make ReportUtils.chatIncludesConcierge a boolean value.

const isBlockedFromConcierge = useMemo(() => ReportUtils.chatIncludesConcierge(report) && User.isBlockedFromConcierge(blockedFromConcierge), [report, blockedFromConcierge]);

@dukenv0307
Copy link
Contributor

Proposal

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

DEV: console error on ReportActionCompose

What is the root cause of that problem?

We calculate isBlockedFromConcierge here

const isBlockedFromConcierge = useMemo(() => ReportUtils.chatIncludesConcierge(report) && User.isBlockedFromConcierge(blockedFromConcierge), [report, blockedFromConcierge]);

In chatIncludesConcierge, before the data is loaded completely report.participantAccountIDs is undefined that makes this function return undefined and then isBlockedFromConcierge is undefined because undefined && boolean = undefined

App/src/libs/ReportUtils.js

Lines 809 to 811 in bb432aa

function chatIncludesConcierge(report) {
return report.participantAccountIDs && _.contains(report.participantAccountIDs, CONST.ACCOUNT_ID.CONCIERGE);
}

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

We should update chatIncludesConcierge function to make sure it always returns a boolean by getting participantAccountIDs or set it as an empty array

function chatIncludesConcierge(report) {
    const participantAccountIDs = report.parentReportActionIDs || []
    return participantAccountIDs && _.contains(participantAccountIDs, CONST.ACCOUNT_ID.CONCIERGE);
}

App/src/libs/ReportUtils.js

Lines 809 to 811 in bb432aa

function chatIncludesConcierge(report) {
return report.participantAccountIDs && _.contains(report.participantAccountIDs, CONST.ACCOUNT_ID.CONCIERGE);
}

What alternative solutions did you explore? (Optional)

We can also set default isBlockedFromConcierge prop value in AttachmentPickerWithMenuItems and ComposerWithSuggestions

@melvin-bot melvin-bot bot added the Overdue label Sep 6, 2023
@situchan
Copy link
Contributor

situchan commented Sep 6, 2023

Just doing an expedited review as this is annoying. When refresh app every time, hard to see other console errors caused by test branch as this one shows always.

@Pujan92's proposal looks good - !_.isEmpty(report.participantAccountIDs)

@sonialiap as this is dev-only issue, I am going to pull up engineer directly - 🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

Triggered auto assignment to @nkuoch, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@nkuoch
Copy link
Contributor

nkuoch commented Sep 6, 2023

@Pujan92 's proposal looks good, but seems like I can't assign them to the issue, maybe because they didn't post the proposal to this issue by themselves?

@melvin-bot melvin-bot bot removed the Overdue label Sep 6, 2023
@situchan
Copy link
Contributor

situchan commented Sep 6, 2023

@Pujan92 's proposal looks good, but seems like I can't assign them to the issue, maybe because they didn't post the proposal to this issue by themselves?

correct.

@Pujan92 please comment with any word here so @nkuoch can assign.
@nkuoch please assign me too 🙂

@Pujan92
Copy link
Contributor

Pujan92 commented Sep 6, 2023

Commenting to get assigned.

@Pujan92
Copy link
Contributor

Pujan92 commented Sep 6, 2023

I think external and help-wanted labels also required to generate offers.

@situchan
Copy link
Contributor

situchan commented Sep 6, 2023

@nkuoch can you please do actions in this order?

@nkuoch nkuoch assigned situchan and unassigned Pujan92 Sep 6, 2023
@nkuoch nkuoch added the External Added to denote the issue can be worked on by a contributor label Sep 6, 2023
@melvin-bot melvin-bot bot changed the title Dev: console error if we open RHN page directly [$500] Dev: console error if we open RHN page directly Sep 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

Job added to Upwork: https://www.upwork.com/jobs/~013c4503a94278a1ad

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

melvin-bot bot commented Sep 6, 2023

Current assignee @sonialiap is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

Current assignee @situchan is eligible for the External assigner, not assigning anyone new.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 6, 2023

📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@situchan] The PR that introduced the bug has been identified. Link to the PR:
  • [@situchan] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@situchan] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@situchan] Determine if we should create a regression test for this bug.
  • [@situchan] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Monthly KSv2 and removed Weekly KSv2 Daily KSv2 Monthly KSv2 labels Sep 18, 2023
@sonialiap
Copy link
Contributor

sonialiap commented Sep 19, 2023

Payments - sent ✔️
@Pujan92 report + fix + bonus = $50 + $500 + $250 = $800 edit based on this $250 + $500 + $250 = $1000
@situchan review + bonus = $500 + $250 = $750

@sonialiap
Copy link
Contributor

@situchan please fill out the checklist so that we can close this issue :)

@situchan
Copy link
Contributor

This doesn't require BZ checklist.
Console error check is already in PR checklist and it's just dev error, not affecting production app.

@Pujan92
Copy link
Contributor

Pujan92 commented Sep 19, 2023

@sonialiap Can you plz check this slack thread https://expensify.slack.com/archives/C01GTK53T8Q/p1694444733848299 and confirm whether this should be eligible for old payment price or not as this issue gets reported on 25th aug before new pay price(31st aug) applied.

@melvin-bot melvin-bot bot added the Overdue label Sep 21, 2023
@sonialiap
Copy link
Contributor

@Pujan92 Thanks for bringing this up! I went by the date the gh issue was opened and didn't check the reporting date.

The reporting date was Aug 26 so you are eligible for the old reporting bonus of $250. I have already issued a payment of $50 so you're owed $200. I just sent an offer for $200.

image

@melvin-bot melvin-bot bot removed the Overdue label Sep 22, 2023
@Pujan92
Copy link
Contributor

Pujan92 commented Sep 22, 2023

Thanks @sonialiap for reconsidering but I believe contributor price also needs to be updated by considering it($1000+$500 for urgency bonus)

@melvin-bot melvin-bot bot added the Overdue label Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

@nkuoch, @Pujan92, @sonialiap, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@sonialiap
Copy link
Contributor

@Pujan92 The GH issue was created and became available after the pricing change so the fix and review are both $500

@melvin-bot melvin-bot bot removed the Overdue label Sep 26, 2023
@Pujan92
Copy link
Contributor

Pujan92 commented Sep 26, 2023

Oh, ok @sonialiap. I thought all payments needs to be with old price. Thanks for clearing.

@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 29, 2023

@nkuoch, @Pujan92, @sonialiap, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@sonialiap
Copy link
Contributor

I believe all payments have been processed, please reopen if I missed anything in the discussion

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@Pujan92
Copy link
Contributor

Pujan92 commented Oct 3, 2023

I believe all payments have been processed, please reopen if I missed anything in the discussion

@sonialiap payment is pending here, could you plz check.

@Pujan92
Copy link
Contributor

Pujan92 commented Oct 5, 2023

Bump @sonialiap

@Pujan92
Copy link
Contributor

Pujan92 commented Oct 13, 2023

Bump @sonialiap for remaining payment

@sonialiap
Copy link
Contributor

@Pujan92 my apologies! Payment completed!

@Pujan92
Copy link
Contributor

Pujan92 commented Oct 31, 2023

No issues, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

6 participants