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
[$250] [Due for payment 2025-09-19] Remove call to getReportNameValuePairs() in method getInvoiceChatByParticipants from ReportUtils.ts #67101
🔔 Note for Contributors: Please ensure that you are responsible in the PR phase to try to get it done soon
The function getInvoiceChatByParticipants() 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 getInvoiceChatByParticipants() in its current form. If it doesn't, create one — and aim for high-quality, thorough coverage.
Refactor getInvoiceChatByParticipants() 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 getInvoiceChatByParticipants() 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.
Activity
getReportNameValuePairs()#59961melvin-bot commentedon Jul 24, 2025
Triggered auto assignment to @jliexpensify (
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.etCoderDysto commentedon Jul 24, 2025
I am happy to take this if it is available
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 getInvoiceChatByParticipants() 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 getInvoiceChatByParticipants() in its current form. If it doesn't, create one — and aim for high-quality, thorough coverage.
Refactor getInvoiceChatByParticipants() 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 getInvoiceChatByParticipants() is called to accommodate the new isReportArchived parameter.
DylanDylann commentedon Jul 24, 2025
@etCoderDysto Please read above the guideline and let us know if you are interested in this one
etCoderDysto commentedon Jul 24, 2025
@DylanDylann yes I have read the guidline. I am interested to work on it
31 remaining items
melvin-bot commentedon Sep 16, 2025
Current assignee @DylanDylann is eligible for the External assigner, not assigning anyone new.
jliexpensify commentedon Sep 16, 2025
Payment Summary
Upwork: https://www.upwork.com/jobs/~021967866627145201870
etCoderDysto commentedon Sep 16, 2025
I have accepted the offer. Thanks 🙏
jliexpensify commentedon Sep 22, 2025
Whoops missed the tag, sorry for the delay. Paid and job closed!
jliexpensify commentedon Sep 22, 2025
@DylanDylann - summary here
garrettmknight commentedon Nov 11, 2025
$250 approved for @DylanDylann