-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-02-26] [$250] Company cards - Transaction start date reset when click on it #55960
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
Comments
Triggered auto assignment to @mallenexpensify ( |
|
🚨 Edited by proposal-police: This proposal was edited at 2025-01-29 15:04:21 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.The Selected date reset to default today value when user go back to edit it from Confirmation page from Assign card flow. What is the root cause of that problem?We are not using the stored selected date on the load of this page TransactionStartDateStep step.
What changes do you think we should make in order to solve the problem?
const [assignCard] = useOnyx(ONYXKEYS.ASSIGN_CARD);
const data = assignCard?.data;
const [startDate, setStartDate] = useState(() => data?.startDate ?? format(new Date(), CONST.DATE.FNS_FORMAT_STRING));
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?UI changes but let me know if needed. What alternative solutions did you explore? (Optional)None |
|
🚨 Edited by proposal-police: This proposal was edited at 2025-01-30 08:00:59 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Transaction start date reset when click on it What is the root cause of that problem?We always intializing a new date everytime the select transaction start date is rendered. This causes the selected new date to not persist:
What changes do you think we should make in order to solve the problem?
<TransactionStartDateStep cardData={assignCard?.data} />
const [startDate, setStartDate] = useState(() => format(cardData?. startDate ?? new Date(), CONST.DATE.FNS_FORMAT_STRING)); We can also clear the date in What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?I think we can mock a UI test here, we can set the value of What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~021885139273750727768 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
@allroundexperts can you review @parasharrajat and @twilight2294 's proposals plz? |
Thanks for the proposals everyone. @parasharrajat's proposal looks good to me. It has the correct RCA and the proposed solution works as well. @twilight2294 I don't see much difference in your RCA and proposed solution from what @parasharrajat proposed earlier. You're just lifting the usage of 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @marcochavezf, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
It's that i am passing it to a component instead of calling it in the page which is unique cause it saves the extra call to |
We already using useOnyx inside the component and this component does not seem very heavy so I don't think we need to pre-optimise this case. Also, we already moving away from lifting the state to parent component. |
Oh is it? didn't know that, thanks for the info, any discussion link about this where i can follow up to understand better with this approach @parasharrajat ? |
This is not a rule. IMO, keeping state to the component is good. I think we did refactored a few components in the past so I stated. |
hmm, okay, lets see what the internal engineer thinks Cause if we pass down the value then we save that extra |
I think both solutions solve the problem here and I agree we don't need to pre-optimise for this flow, said that I'm leaning towards @allroundexperts decision, assigning @parasharrajat 🚀 |
Thanks for reviewing @marcochavezf I appreciate the opinion , thanks to @allroundexperts too 😄 |
Expect the PR by EOD... |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.0-2 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 2025-02-26. 🎊 For reference, here are some details about the assignees on this issue:
|
@parasharrajat / @allroundexperts @mallenexpensify @parasharrajat / @allroundexperts 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] |
Payment Summary
BugZero Checklist (@mallenexpensify)
|
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@allroundexperts can you please complete the BZ checklist so I can get y'all paid? Thx |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalPrecondition:
Test:
Verify that the displayed date is the date user set on step 6 Do we agree 👍 or 👎 |
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@mallenexpensify Could you please add the summary and close this issue? Thanks. |
Contributor: @parasharrajat due $250 via NewDot Test case Thx! |
Payment requested as per #55960 (comment) |
$250 approved for @parasharrajat |
Uh oh!
There was an error while loading. Please reload this page.
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.91-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/cases/view/3809599
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: MacOS Catalina 10.15.7
App Component: Other
Action Performed:
Precondition: workspace with enabled Company cards. Some company cards are added to workspace.
Expected Result:
Displayed date is the date user set on step 5
Actual Result:
Displayed date is the current date
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6727455_1738158936068.card_date.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensifyThe text was updated successfully, but these errors were encountered: