Skip to content

[$250] [Due for payment 2025-09-19] Remove call to getReportNameValuePairs() in method getInvoiceChatByParticipants from ReportUtils.ts #67101

Closed

Description

@tgolen

This is part of #59961 and will ensure that the function is a pure function.

No proposals are necessary for this.

Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021967866627145201870
  • Upwork Job ID: 1967866627145201870
  • Last Price Increase: 2025-09-16
Issue OwnerCurrent Issue Owner: @jliexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 24, 2025
  2. melvin-bot commented on Jul 24, 2025

    @melvin-bot

    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.

  3. etCoderDysto commented on Jul 24, 2025

    @etCoderDysto
    Contributor

    I am happy to take this if it is available

  4. DylanDylann commented on Jul 24, 2025

    @DylanDylann
    Contributor

    🔔 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

    1. 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.

    2. 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

    1. Avoid adding new global references to data via Onyx.connect.
    2. Avoid using isArchivedReport(nameValuePairs) unless absolutely necessary.
    3. Prefer fetching data in a UI component, then pass it down via parameters.
    4. Consider using the useReportIsArchived() React hook — it’s designed for this.
    5. Before making changes, check if the report's NVPs are already available or if isReportArchived is already calculated or passed.
  5. DylanDylann commented on Jul 24, 2025

    @DylanDylann
    Contributor

    @etCoderDysto Please read above the guideline and let us know if you are interested in this one

  6. etCoderDysto commented on Jul 24, 2025

    @etCoderDysto
    Contributor

    @etCoderDysto Please read above the guideline and let us know if you are interested in this one

    @DylanDylann yes I have read the guidline. I am interested to work on it

  7. 31 remaining items

  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 16, 2025
  9. melvin-bot commented on Sep 16, 2025

    @melvin-bot

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

  10. jliexpensify commented on Sep 16, 2025

    @jliexpensify
    Contributor

    Payment Summary

    Upwork: https://www.upwork.com/jobs/~021967866627145201870

  11. etCoderDysto commented on Sep 16, 2025

    @etCoderDysto
    Contributor

    I have accepted the offer. Thanks 🙏

  12. jliexpensify commented on Sep 22, 2025

    @jliexpensify
    Contributor

    Whoops missed the tag, sorry for the delay. Paid and job closed!

  13. jliexpensify commented on Sep 22, 2025

    @jliexpensify
    Contributor
  14. garrettmknight commented on Nov 11, 2025

    @garrettmknight
    Contributor

    $250 approved for @DylanDylann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions