-
Notifications
You must be signed in to change notification settings - Fork 3k
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-23] [$500] Request money - On last day of month, going back to previous month disables forward button in request money date field #28622
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.For the last day of month after moving back to previous month, next arrow is disabled. What is the root cause of that problem?
is false being both sides equal and next arrow is disabled. What changes do you think we should make in order to solve the problem?We should change the const hasAvailableDatesNextMonth = moment(this.props.maxDate).endOf('month').startOf('day') >= moment(this.state.currentDateView).add(1, 'months'); What alternative solutions did you explore? (Optional)ResultnextArrowEnabledForLastDateOfMonth.mov |
Triggered auto assignment to @anmurali ( |
Job added to Upwork: https://www.upwork.com/jobs/~01439bf07509667c9f |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.While going back to the previous month from last day of the month, Arrow forward button is disabled in request money date field. What is the root cause of that problem?In the below code we check whether to disable Arrow forward button for next month or not.
We have to check the end of day to include the complete month, but in the above code we are only considering the start of day, not the end What changes do you think we should make in order to solve the problem?We just need to check end of day instead of start of day to get the correct conditional result. const hasAvailableDatesNextMonth = moment(this.props.maxDate).endOf('month').endOf('day') > moment(this.state.currentDateView).add(1, 'months'); What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.If the user is on the last day of the month and then goes back to the previous month in the request money date field, it causes the forward button to become disabled. What is the root cause of that problem?The problem stems from the date comparison logic, which doesn't handle the last day of the month scenario properly in the following line:
What changes do you think we should make in order to solve the problem?To solve this problem, we should modify the calculation for const hasAvailableDatesNextMonth = moment(this.props.maxDate).endOf('month').startOf('day') > moment(this.state.currentDateView).add(1, 'months').startOf('month'); By adding POC:Screen.Recording.2023-09-30.at.8.48.25.PM.mov |
Please notice that my proposal was the first proposal posted on Slack in this thread @situchan https://expensify.slack.com/archives/C049HHMV9SM/p1696096241828129?thread_ts=1696091411.087619&cid=C049HHMV9SM Thanks |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Thanks for the proposals everyone. @abzokhattab we don't allow posting proposals in slack unless bug reporter. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @cristipaval, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @c3024 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @dhanashree-sawant 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-23. 🎊 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:
|
@situchan could you please do the checklist? |
friendly bump @situchan |
This is edge case and not worth adding regression test. |
Thanks @situchan! |
This is eligible for bonus. Could you complete the payment? |
@anmurali, what's the payment status of this one? |
Just to note that this is eligible for bonus. PR was C+ approved within bonus period and merged without any changes |
Paid with bonus |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Precondition: It only happens when date is last day of month, if needed, same can be mimicked by changing device date
Expected Result:
App should not disable next button of month if next month in value is current month
Actual Result:
App disables next button of month even if next month in value is current month in date field of request money on last day of month
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.75-8
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
android.chrome.last.day.month.on.back.in.month.again.no.forward.mp4
windows.chrome.last.day.month.on.back.in.month.again.no.forward.mp4
mac.chrome.desktop.last.day.month.on.back.in.month.again.no.forward.mov
android.native.last.day.month.on.back.in.month.again.no.forward.mov
ios.safari.native.last.day.month.on.back.in.month.again.no.forward.mov
Recording.1684.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696091411087619
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: