Skip to content

[Due for payment 2025-09-26] Remove call to getReportNameValuePairs() in method getReportNameInternal from ReportUtils.ts #67094

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: @johncschuster

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 @johncschuster (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. Tony-MK commented on Jul 24, 2025

    @Tony-MK
    Contributor

    @tgolen, could I work on this one?

  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 getReportNameInternal() 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 getReportNameInternal() in its current form. If it doesn't, create one — and aim for high-quality, thorough coverage.

    2. Refactor getReportNameInternal() 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 getReportNameInternal() 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

    @Tony-MK please read the above guideline. This may be a big change, let us know if you are able to be responsive and prioritise it.

  6. Tony-MK commented on Jul 24, 2025

    @Tony-MK
    Contributor

    @Tony-MK please read the above guideline. This may be a big change, let us know if you are able to be responsive and prioritise it.

    @DylanDylann, Sure, but does it still need a proposal?

  7. 54 remaining items

  8. melvin-bot commented on Sep 26, 2025

    @melvin-bot

    Issue is ready for payment but no BZ is assigned. @bfitzexpensify you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

  9. melvin-bot commented on Sep 26, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@bfitzexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  10. Tony-MK commented on Sep 28, 2025

    @Tony-MK
    Contributor

    Requested payment as per the Payment Summary.

  11. twisterdotcom commented on Sep 28, 2025

    @twisterdotcom
    Contributor

    @Tony-K has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-b236-a2e7-77f4-84d6e553e261
  12. johncschuster commented on Sep 29, 2025

    @johncschuster
    Contributor

    Payment Summary

    Contributor: @Tony-MK due $250 via NewDot
    Contributor+: @DylanDylann due $250 via NewDot

  13. melvin-bot commented on Sep 30, 2025

    @melvin-bot

    @johncschuster Whoops! This issue is 2 days overdue. Let's get this updated quick!

  14. johncschuster commented on Sep 30, 2025

    @johncschuster
    Contributor

    Looks like we can close this up. @DylanDylann don't forget to request payment!

  15. trjExpensify commented on Nov 24, 2025

    @trjExpensify
    Contributor

    approved $250 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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions