App: [HOLD for payment 2023-12-18] [$500] ReportUtils.shouldReportBeInOptionList will always be falsy for specific reports

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


During Typescript migration I noticed that in SidebarUtils module in getOrderedReportIDs function we have allReportActions param which is typed as Record<string, ReportAction[]>. It’s used in ReportUtils.shouldReportBeInOptionList function. If we go deeper inside ReportUtils.shouldReportBeInOptionList it will be used in ReportUtils.canAccessReport then there it will be used in ReportActionsUtils.getParentReportAction which expects that allReportActions will be a collection of object no collection of arrays, which could lead into problems. There is no bug which I noticed yet, but I think its worth of checking.

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

image image

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e1c89ccf309fa85a
  • Upwork Job ID: 1721662000620908544
  • Last Price Increase: 2023-11-27

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 40 (19 by maintainers)

Commits related to this issue

Most upvoted comments

We can skip BZ checklist as no visual bug, no new feature.

I will be OOO starting Monday, December 18, and will return Tuesday, January 2.

Current status: Payment Summary is written. BZ list isn’t necessary. This just needs to be manually closed after the regression wait period has passed.

If this issue is open when I’m back from OOO, I’ll take it back over. Thank you!

yes, we are ok. I double checked. And also will be removed soon in https://github.com/Expensify/App/pull/28002 Let’s assign @kubabutkiewicz 🎀 👀 🎀 C+ reviewed

@aimane-chnaif sure I can work on this if we are ok with removing this parameter