uhabits
uhabits copied to clipboard
Entering measurable habit via notification after midnight counts for wrong day
Pre-submission checklist
- [x] I am submitting a bug report, not a feature request.
- [x] I have searched for similar issues, but did not find any matches.
Similar issues, that are not duplicates:
- #969
- #1174
Description
Following scenario: I have a measurable habit for which I configured a reminder. I get the reminder notification on day A, but ignore it until after midnight. Now it is day B and the notification is still there. When I now use the notification to make the entry for the measurable habit, it will count for day B, but I would expect and want an entry for day A. This is similar to the problem described in #969, where this behaviour was classified as unintended for yes/no habits.
The "extend day a few hours past midnight" setting is off in this case. If the setting were turned on, I would assume the problem still exists after 3:00 am.
Postponing the reminder by pressing "later" on the notification is not necessary for this behaviour, which is why I believe it is a different bug than #1174. In that regard I want to note that, in case #1174 will be fixed, measurable habits should be considered as well.
Steps to reproduce
- Make sure the "extend day a few hours past midnight" setting is off
- Create a new habit
- Add a reminder for e.g. 23:59
- Wait for the reminder, don't interact with it
- Wait for e.g. 00:01 the next day
- Click "Enter" on the notification and make numerical entry
- Check the habit in the main activity and see that the entry was not made for the previous day, but instead for the current day.
System information
- Phone: OnePlus 6
- Phone Operating System: Android 11
- App version: 2.0.3
Thank you for the detailed bug report, @leopoldsedev. I was able to reproduce it.