You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-09-18] [$500] Dev: console error if we open RHN page directly #26561
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
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.
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.
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
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
@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?
@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 🙂
Activity
melvin-bot commentedon Sep 2, 2023
Triggered auto assignment to @sonialiap (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 2, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)kavimuru commentedon Sep 2, 2023
Proposal from @Pujan92
Please re-state the problem that we are trying to solve in this issue.
Console error for
isBlockedFromConciergepassed undefined but it’s required propWhat is the root cause of that problem?
In PR we added prop
isBlockedFromConciergerequired inAttachmentPickerWithMenuItems&ComposerWithSuggestionscomponents. But fromReportActionComposeit gets passed undefined when we directly open the RHN screen.App/src/pages/home/report/ReportActionCompose/ReportActionCompose.js
Line 158 in 7217a18
Bcoz by the time the report gets loaded it has a default value
{reportID: ‘0’}, so conditionReportUtils.chatIncludesConcierge(report)returns undefined, with thatundefined && falsereturns 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
OR
We can use double negate or Boolean constructor to make
ReportUtils.chatIncludesConciergea boolean value.App/src/pages/home/report/ReportActionCompose/ReportActionCompose.js
Line 158 in 7217a18
dukenv0307 commentedon Sep 6, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
DEV: console error on
ReportActionComposeWhat is the root cause of that problem?
We calculate
isBlockedFromConciergehereApp/src/pages/home/report/ReportActionCompose/ReportActionCompose.js
Line 159 in bb432aa
In
chatIncludesConcierge, before the data is loaded completelyreport.participantAccountIDsisundefinedthat makes this function returnundefinedand thenisBlockedFromConciergeisundefinedbecauseundefined && boolean = undefinedApp/src/libs/ReportUtils.js
Lines 809 to 811 in bb432aa
What changes do you think we should make in order to solve the problem?
We should update
chatIncludesConciergefunction to make sure it always returns a boolean by gettingparticipantAccountIDsor set it as an empty arrayApp/src/libs/ReportUtils.js
Lines 809 to 811 in bb432aa
What alternative solutions did you explore? (Optional)
We can also set default
isBlockedFromConciergeprop value inAttachmentPickerWithMenuItemsandComposerWithSuggestionssituchan commentedon 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 commentedon Sep 6, 2023
Triggered auto assignment to @nkuoch, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
nkuoch commentedon 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?
situchan commentedon Sep 6, 2023
correct.
@Pujan92 please comment with any word here so @nkuoch can assign.
@nkuoch please assign me too 🙂
45 remaining items
melvin-bot commentedon Sep 25, 2023
@nkuoch, @Pujan92, @sonialiap, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
sonialiap commentedon Sep 26, 2023
@Pujan92 The GH issue was created and became available after the pricing change so the fix and review are both $500
Pujan92 commentedon Sep 26, 2023
Oh, ok @sonialiap. I thought all payments needs to be with old price. Thanks for clearing.
melvin-bot commentedon Sep 29, 2023
@nkuoch, @Pujan92, @sonialiap, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
sonialiap commentedon Oct 2, 2023
I believe all payments have been processed, please reopen if I missed anything in the discussion
Pujan92 commentedon Oct 3, 2023
@sonialiap payment is pending here, could you plz check.
Pujan92 commentedon Oct 5, 2023
Bump @sonialiap
Pujan92 commentedon Oct 13, 2023
Bump @sonialiap for remaining payment
sonialiap commentedon Oct 31, 2023
@Pujan92 my apologies! Payment completed!
Pujan92 commentedon Oct 31, 2023
No issues, Thanks!