Skip to content

[HOLD for payment 2024-03-26] [$500] Clean up the PersonalDetails type #38118

Closed

Description

@VickyStash

The issue was noticed during Report TS migration PR review.

Problem

During Task creation from a message, the code uses assignee.assigneeChatReport where the assignee has PersonalDetails type. But assigneeChatReport is always undefined in this case cause it doesn't exist in the assignee. It also leads to unnecessary field assigneeChatReport in the PersonalDetails type.

let assignee: OnyxTypes.PersonalDetails | EmptyObject = {};
if (email) {
assignee = Object.values(allPersonalDetails).find((value) => value?.login === email) ?? {};
}
Task.createTaskAndNavigate(report.reportID, title, '', assignee?.login ?? '', assignee.accountID, assignee.assigneeChatReport, report.policyID);

Solution

  1. Get rid of non-existing assignee.assigneeChatReport usage.
  2. Remove assigneeChatReport field from PersonalDetails type.
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012dff61fb5ff367d3
  • Upwork Job ID: 1767670780339933184
  • Last Price Increase: 2024-03-12
Issue OwnerCurrent Issue Owner: @MitchExpensify

Activity

  1. added
    Bug
    Daily
    on Mar 12, 2024
  2. melvin-bot commented on Mar 12, 2024

    @melvin-bot

    Triggered auto assignment to @MitchExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. ShridharGoel commented on Mar 12, 2024

    @ShridharGoel
    Contributor

    Can I pick this?

  4. VickyStash commented on Mar 12, 2024

    @VickyStash
    ContributorAuthor

    Hi, I'm Viktoryia from Callstack - expert contributor group - and I would like to work on this issue. ^^ @puneetlath

  5. added
    External
    on Mar 12, 2024
  6. changed the title [-]Clean up the `PersonalDetails` type[/-] [+][$500] Clean up the `PersonalDetails` type[/+] on Mar 12, 2024
  7. melvin-bot commented on Mar 12, 2024

    @melvin-bot
  8. added
    Help Wanted
    on Mar 12, 2024
  9. melvin-bot commented on Mar 12, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @cubuspl42 (External)

  10. 6 remaining items

  11. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Mar 15, 2024
  12. changed the title [-][$500] Clean up the `PersonalDetails` type[/-] [+][HOLD for payment 2024-03-26] [$500] Clean up the `PersonalDetails` type[/+] on Mar 19, 2024
  13. removed
    Reviewing
    on Mar 19, 2024
  14. melvin-bot commented on Mar 19, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Mar 19, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.54-4 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-03-26. 🎊

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

    • @cubuspl42 requires payment (Needs manual offer from BZ)
    • @VickyStash does not require payment (Contractor)
  16. melvin-bot commented on Mar 19, 2024

    @melvin-bot

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

    • [@cubuspl42] The PR that introduced the bug has been identified. Link to the PR:
    • [@cubuspl42] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@cubuspl42] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@cubuspl42] Determine if we should create a regression test for this bug.
    • [@cubuspl42] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@MitchExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. MitchExpensify commented on Mar 20, 2024

    @MitchExpensify
    Contributor

    Payment summary:

    C+: $500 cubuspl42 (Upwork)

  18. jakub-trzebiatowski commented on Mar 20, 2024

    @jakub-trzebiatowski
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR:
      • Not a bug; code cleanup
    • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
      • N/A
    • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
      • No need for additional discussion
    • Determine if we should create a regression test for this bug.
      • No
    • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
      • N/A
  19. jakub-trzebiatowski commented on Mar 27, 2024

    @jakub-trzebiatowski
    Contributor

    This offer gives me error:

    It seems like we ran into an unexpected problem with this offer. Please ask the client to withdraw it and create a new one, or contact Upwork support.

    I know that others had this problem too with some offers.

  20. MitchExpensify commented on Mar 28, 2024

    @MitchExpensify
    Contributor

    Paid and contract ended - Did you receive @cubuspl42 ?

  21. jakub-trzebiatowski commented on Apr 2, 2024

    @jakub-trzebiatowski
    Contributor

    All good 👍

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

Metadata

Metadata

Labels

Awaiting PaymentBugExternalWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions