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
[Due for payment 2025-08-13] Remove call to getReportNameValuePairs() in method getIcons from ReportUtils.ts #67092
🔔 Note for Contributors: Please ensure that you are responsible in the PR phase to try to get it done soon
The function getIcons() is not a pure function because it references the report's NVPs from a global variable here. This is considered an anti-pattern that we are actively working to eliminate.
✅ Your Task
Verify that a unit test exists for getIcons() in its current form. If it doesn't, create one — and aim for high-quality, thorough coverage.
Refactor getIcons() into a pure function, and introduce a new parameter: isReportArchived = false (It is recommended to use useReportIsArchived to get isReportArchived). And update all instances in the codebase where getIcons() is called to accommodate the new isReportArchived parameter.
⚠️ Best Practices to Follow
Avoid adding new global references to data via Onyx.connect.
Avoid using isArchivedReport(nameValuePairs) unless absolutely necessary.
Prefer fetching data in a UI component, then pass it down via parameters.
Consider using the useReportIsArchived() React hook — it’s designed for this.
Before making changes, check if the report's NVPs are already available or if isReportArchived is already calculated or passed.
I only have a pending task on only one PR, all the other PRs are in completed, just need to add recording. I'm on them and trying to finish those with few hours.
@DylanDylann@abekkala The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Activity
getReportNameValuePairs()#59961melvin-bot commentedon Jul 24, 2025
Triggered auto assignment to @abekkala (
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.DylanDylann commentedon Jul 24, 2025
🔔 Note for Contributors: Please ensure that you are responsible in the PR phase to try to get it done soon
The function getIcons() is not a pure function because it references the report's NVPs from a global variable here. This is considered an anti-pattern that we are actively working to eliminate.
✅ Your Task
Verify that a unit test exists for getIcons() in its current form. If it doesn't, create one — and aim for high-quality, thorough coverage.
Refactor getIcons() into a pure function, and introduce a new parameter: isReportArchived = false (It is recommended to use useReportIsArchived to get isReportArchived). And update all instances in the codebase where getIcons() is called to accommodate the new isReportArchived parameter.
Krishna2323 commentedon Jul 24, 2025
@DylanDylann, I have read the guidelines for this issue. I would like to work on this.
DylanDylann commentedon Jul 24, 2025
@Krishna2323, I see you have some pending tasks now. Are you confident that you can speed this issue up and be responsive in the PR phase?
Krishna2323 commentedon Jul 24, 2025
I only have a pending task on only one PR, all the other PRs are in completed, just need to add recording. I'm on them and trying to finish those with few hours.
19 remaining items
melvin-bot commentedon Aug 6, 2025
@DylanDylann @abekkala The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
abekkala commentedon Aug 7, 2025
PAYMENT SUMMARY FOR AUG 13
please complete checklist
melvin-bot commentedon Aug 13, 2025
Payment Summary
Upwork Job
BugZero Checklist (@abekkala)
abekkala commentedon Aug 14, 2025
@tgolen do these issues require the checklist before closing?
tgolen commentedon Aug 14, 2025
Nope, not for these ones that remove
getReportNameValuePairs(). It's merely a refactoring task, so the checklist doesn't apply.abekkala commentedon Aug 15, 2025
posting this once more for better visibility:
PAYMENT SUMMARY FOR AUG 13
Krishna2323 commentedon Aug 15, 2025
Requested in NewDot.
flaviadefaria commentedon Aug 20, 2025
$250 approved for @Krishna2323
quinthar commentedon Oct 17, 2025
Approved $250 to @DylanDylann