Skip to content

[HOLD for payment 2024-06-28] [HOLD for payment 2024-06-24] [$250] [TS Migration] Define a concise way to access or default to an inexistent record #39125

Closed

Description

@mountiny

Follow up issue for TS migration project. Coming from this spreadsheet

Define a concise way to access or default to an inexistent record (0, -1, etc)

Any more details for this one cc @blazejkustra @fabioh8010

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0127e590dfa2accb42
  • Upwork Job ID: 1780548153949810688
  • Last Price Increase: 2024-04-24
  • Automatic offers:
    • jjcoffee | Reviewer | 0
    • godofoutcasts94 | Contributor | 0
Issue OwnerCurrent Issue Owner: @johncschuster

Activity

  1. changed the title [-][TS Migration] Define a concise way to access or default to an inexistent record[/-] [+][HOLD TS migration completion] [TS Migration] Define a concise way to access or default to an inexistent record[/+] on Mar 28, 2024
  2. fabioh8010 commented on Apr 16, 2024

    @fabioh8010
    Contributor

    Problem

    Currently we have been defaulting nullable entity IDs to either 0 or -1 when it doesn’t exist as we can see here and here (and many other files throughout the project). The lack of conciseness when defaulting such IDs leads to confusion between developers and increased chance of bugs.

    Solution

    Standartise the default values of all Onyx entity IDs. Personally I think we should default all nullable entity IDs to -1 as it is a negative ID and theoretically we would never have a negative one in the DB (@mountiny makes sense to you?):

    1. For each Onyx type inside src/types/onyx/, look for properties that ends with ID?: ..., e.g. managerID?: number;, parentReportID?: string;, iouReportID?: string; inside Report.ts
    2. For each property, look for its usage throughout the codebase.
    3. If that property is being defaulted to either 0 or -1, change it to -1.
    4. Change TS_STYLE.md to include this advice of using -1 to default these kind of ID properties.
    5. Test everything extensively.
  3. changed the title [-][HOLD TS migration completion] [TS Migration] Define a concise way to access or default to an inexistent record[/-] [+][TS Migration] Define a concise way to access or default to an inexistent record[/+] on Apr 16, 2024
  4. mountiny commented on Apr 16, 2024

    @mountiny
    ContributorAuthor

    @fabioh8010 this makes sense to me, but I think we need to bring this up to slack for broader agreement, can you post the proposal to open source channel before proceeding?

  5. fabioh8010 commented on Apr 17, 2024

    @fabioh8010
    Contributor

    @mountiny Sure, I can post! But could you make this issue External? It was marked as External initially.

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    NewFeatureSomething to build that is a new item.
    on Apr 17, 2024
  7. 84 remaining items

  8. melvin-bot commented on Jun 17, 2024

    @melvin-bot

    BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@jjcoffee] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
    • [@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.
  9. changed the title [-][HOLD for payment 2024-06-24] [$250] [TS Migration] Define a concise way to access or default to an inexistent record[/-] [+][HOLD for payment 2024-06-28] [HOLD for payment 2024-06-24] [$250] [TS Migration] Define a concise way to access or default to an inexistent record[/+] on Jun 21, 2024
  10. melvin-bot commented on Jun 21, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.85-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-06-28. 🎊

    For reference, here are some details about the assignees on this issue:

  11. melvin-bot commented on Jun 21, 2024

    @melvin-bot

    BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@jjcoffee] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
    • [@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.
  12. johncschuster commented on Jun 24, 2024

    @johncschuster
    Contributor

    Discussing in Slack to make sure I'm understanding the correct payment date

  13. johncschuster commented on Jun 25, 2024

    @johncschuster
    Contributor

    @jjcoffee do we need a regression test for this? If so, can you propose the steps?

  14. johncschuster commented on Jun 25, 2024

    @johncschuster
    Contributor

    Payment Summary:

    Contributor: @kubabutkiewicz - does not require payment
    Contributor+: @jjcoffee - $250 - paid via Upwork - PAID

  15. jjcoffee commented on Jun 26, 2024

    @jjcoffee
    Contributor

    do we need a regression test for this? If so, can you propose the steps?

    @johncschuster No I don't think so, since this is an app-wide change.

  16. johncschuster commented on Jun 26, 2024

    @johncschuster
    Contributor

    Awesome. Thank you!

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 productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.TaskTypescript Migration

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions