-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2023-10-16] [$500] propTypes warning - policy
is marked as required in MoneyRequestHeader
#26991
Comments
Triggered auto assignment to @abekkala ( |
Bug0 Triage Checklist (Main S/O)
|
@marcaaron We're still requiring Having correct |
@marcaaron I have reported this issue here |
Here is proposal if I am allowed to have one: Proposed solutionPlease re-state the problem that we are trying to solve in this issue.DEV: console error on request money thread What is the root cause of that problem?**After policy is deleted, we dont have data in onyx. So policy data returned is undefined which is throwing an error when undefined passed to
What changes do you think we should make in order to solve the problem?**We can pass empty object if policy is not found - ReportScreen.js <MoneyRequestHeader
report={report}
- policy={policy}
+ policy={policy || {}}
personalDetails={personalDetails}
isSingleTransactionView={isSingleTransactionView}
parentReportAction={parentReportAction}
/>
So in this scenario, What alternative solutions did you explore? (Optional)N/A |
policy
is marked as required in MoneyRequestHeader
policy
is marked as required in MoneyRequestHeader
Job added to Upwork: https://www.upwork.com/jobs/~01d965fee45c4003a6 |
Current assignee @abekkala is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane ( |
After made a quick analysis to the related files, here's what I found and my proposed solution: Component TreeHow the
const policy = policies[`${ONYXKEYS.COLLECTION.POLICY}${report.policyID}`];
propTypes InconsistenciesThere is propTypes inconsistencies amongs components:
/** The policy which the report is tied to */
policy: PropTypes.shape({
/** Name of the policy */
name: PropTypes.string,
}).isRequired,
/** The report's policy, if we're showing the details for a report and need info about it for AvatarWithDisplay */
policy: PropTypes.shape({
/** Name of the policy */
name: PropTypes.string,
}),
/** The policy which the user has access to and which the report is tied to */
policy: PropTypes.shape({
/** Name of the policy */
name: PropTypes.string,
}), As we can see from above codes, Proposed SolutionMark
|
📣 @azamuddin! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Warning shows on the What is the root cause of that problem?In here, the What changes do you think we should make in order to solve the problem?We should set default value for the
(Instead of default Many other places in the app already follow this same We can optionally remove the There're other places that have the same issue, like What alternative solutions did you explore? (Optional)Probably unrelated to this issue, but when the workspace is deleted, it's money report and money request can still have new messages sent into it, meanwhile the main workspace chat will display |
During component transitions, we must prevent it from moving to the next component before the policy prop data arrives. Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@abekkala, @sobitneupane Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@sobitneupane have you had a chance to review the proposals that have come in? |
Thanks for proposal everyone. If policy is an optional prop, it is better to remove 🎀 👀 🎀 C+ reviewed |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.79-5 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 2023-10-16. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
PAYMENTS FOR OCT 16
|
@sobitneupane can you complete the checklist above? |
@azamuddin payment made and contract ended - thank you! 🎉 |
@sobitneupane can you complete the checklist above prior to requesting payment in Expensify Chat |
Last action needed here: @sobitneupane completes the checklist Payment for: |
@sobitneupane can you complete the checklist above? |
@abekkala Sorry for the delay. I was OOO. I will try to get it done in the weekend. |
https://github.com/Expensify/App/pull/22484/files#r1375904116
It is an edge case and appears only for deleted workspace. It is quite difficult to catch such issues.
I don't think we can add regression test for this bug. So, it is only reproducible in dev. |
Requested payment on newDot. |
@puneetlath, @azamuddin, @abekkala, @sobitneupane Whoops! This issue is 2 days overdue. Let's get this updated quick! |
closing this as payment is handled in newdot and has already been requested |
$500 payment approved for @sobitneupane based on this comment. |
Note this one is maybe just holding on the TS migration since we are deprecating propTypes IIRC cc @hayata-suenaga
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: