Skip to content

[Due for payment 2025-08-13] Remove call to getReportNameValuePairs() in method getIcons from ReportUtils.ts #67092

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

Activity

  1. added
    Weekly
    Bug
    on Jul 24, 2025
  2. melvin-bot commented on Jul 24, 2025

    @melvin-bot

    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.

  3. added
    Daily
    and removed
    Weekly
    on Jul 24, 2025
  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 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

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

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

    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. Krishna2323 commented on Jul 24, 2025

    @Krishna2323
    Contributor

    @DylanDylann, I have read the guidelines for this issue. I would like to work on this.

  6. DylanDylann commented on Jul 24, 2025

    @DylanDylann
    Contributor

    @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?

  7. Krishna2323 commented on Jul 24, 2025

    @Krishna2323
    Contributor

    I see you have some pending tasks now.

    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.

  8. 19 remaining items

  9. melvin-bot commented on Aug 6, 2025

    @melvin-bot

    @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]

  10. abekkala commented on Aug 7, 2025

    @abekkala
    Contributor

    PAYMENT SUMMARY FOR AUG 13

    • Fix: @Krishna2323 [$250, if no regressions] payment via NewDot
    • PR Review: @DylanDylann [$250, if no regressions] payment via NewDot
      please complete checklist
  11. added
    Daily
    and removed
    Weekly
    on Aug 12, 2025
  12. melvin-bot commented on Aug 13, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@abekkala)

    • 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
  13. abekkala commented on Aug 14, 2025

    @abekkala
    Contributor

    @tgolen do these issues require the checklist before closing?

  14. tgolen commented on Aug 14, 2025

    @tgolen
    ContributorAuthor

    Nope, not for these ones that remove getReportNameValuePairs(). It's merely a refactoring task, so the checklist doesn't apply.

  15. abekkala commented on Aug 15, 2025

    @abekkala
    Contributor

    posting this once more for better visibility:

    PAYMENT SUMMARY FOR AUG 13

  16. Krishna2323 commented on Aug 15, 2025

    @Krishna2323
    Contributor

    Requested in NewDot.

  17. flaviadefaria commented on Aug 20, 2025

    @flaviadefaria
    Contributor

    $250 approved for @Krishna2323

  18. quinthar commented on Oct 17, 2025

    @quinthar
    Contributor

    Approved $250 to @DylanDylann

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions