Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-10-11] [$75] Migrate withFullTransactionOrNotFound from withOnyx to useOnyx #49109

Closed
roryabraham opened this issue Sep 12, 2024 · 18 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@roryabraham
Copy link
Contributor

roryabraham commented Sep 12, 2024

Coming from https://expensify.slack.com/archives/C01GTK53T8Q/p1725973460005309?thread_ts=1725905735.105989&cid=C01GTK53T8Q

Migrate src/pages/iou/request/step/withFullTransactionOrNotFound.tsx to use useOnyx instead of withOnyx.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021834284905584427771
  • Upwork Job ID: 1834284905584427771
  • Last Price Increase: 2024-09-12
  • Automatic offers:
    • mkhutornyi | Reviewer | 103949092
Issue OwnerCurrent Issue Owner: @muttmuure
@roryabraham roryabraham added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2024
@roryabraham roryabraham self-assigned this Sep 12, 2024
@roryabraham roryabraham added the External Added to denote the issue can be worked on by a contributor label Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Triggered auto assignment to @muttmuure (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.

@melvin-bot melvin-bot bot changed the title Migrate withFullTransactionOrNotFound from withOnyx to useOnyx [$250] Migrate withFullTransactionOrNotFound from withOnyx to useOnyx Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021834284905584427771

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

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

@roryabraham roryabraham changed the title [$250] Migrate withFullTransactionOrNotFound from withOnyx to useOnyx [$75] Migrate withFullTransactionOrNotFound from withOnyx to useOnyx Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Upwork job price has been updated to $75

@abhinaybathina
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Migrate from withOnyx HOC to useOnyx hook

What is the root cause of that problem?

withOnyx HOC is deprecated

What changes do you think we should make in order to solve the problem?

Whatever props are coming from withOnyx HOC in withFullTransactionOrNotFound should be replaced with useOnyx hook

What alternative solutions did you explore? (Optional)

@daledah
Copy link
Contributor

daledah commented Sep 12, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Migrate withFullTransactionOrNotFound from withOnyx to useOnyx

What is the root cause of that problem?

Migration issue.

What changes do you think we should make in order to solve the problem?

Move these logic inside the WithFullTransactionOrNotFound component and use useOnyx:

transaction: {
key: ({route}) => {
const transactionID = route.params.transactionID ?? -1;
const userAction = 'action' in route.params && route.params.action ? route.params.action : CONST.IOU.ACTION.CREATE;
if (IOUUtils.shouldUseTransactionDraft(userAction)) {
return `${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}` as `${typeof ONYXKEYS.COLLECTION.TRANSACTION}${string}`;
}
return `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`;
},
},

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 13, 2024
Copy link

melvin-bot bot commented Sep 13, 2024

📣 @mkhutornyi 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Sep 13, 2024

📣 @daledah You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@roryabraham
Copy link
Contributor Author

assigning to @daledah since @abhinaybathina is assigned to #49110

@daledah
Copy link
Contributor

daledah commented Sep 17, 2024

@roryabraham PR is ready.

@roryabraham
Copy link
Contributor Author

Awaiting review by @mkhutornyi

Copy link

melvin-bot bot commented Oct 4, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Oct 4, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Oct 4, 2024
@melvin-bot melvin-bot bot changed the title [$75] Migrate withFullTransactionOrNotFound from withOnyx to useOnyx [HOLD for payment 2024-10-11] [$75] Migrate withFullTransactionOrNotFound from withOnyx to useOnyx Oct 4, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

Copy link

melvin-bot bot commented Oct 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.44-12 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-10-11. 🎊

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

Copy link

melvin-bot bot commented Oct 4, 2024

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:

  • [@mkhutornyi] The PR that introduced the bug has been identified. Link to the PR:
  • [@mkhutornyi] 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:
  • [@mkhutornyi] 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:
  • [@mkhutornyi] Determine if we should create a regression test for this bug.
  • [@mkhutornyi] 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.
  • [@muttmuure] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 11, 2024
Copy link

melvin-bot bot commented Oct 14, 2024

@muttmuure, @roryabraham, @mkhutornyi, @daledah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Oct 16, 2024

@muttmuure, @roryabraham, @mkhutornyi, @daledah Eep! 4 days overdue now. Issues have feelings too...

@muttmuure
Copy link
Contributor

Paid

@github-project-automation github-project-automation bot moved this from LOW to Done in [#whatsnext] #quality Oct 17, 2024
@melvin-bot melvin-bot bot removed the Overdue label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Development

No branches or pull requests

5 participants