uhabits icon indicating copy to clipboard operation
uhabits copied to clipboard

Entering measurable habit via notification after midnight counts for wrong day

Open leopoldsedev opened this issue 2 years ago • 1 comments

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

  1. Make sure the "extend day a few hours past midnight" setting is off
  2. Create a new habit
  3. Add a reminder for e.g. 23:59
  4. Wait for the reminder, don't interact with it
  5. Wait for e.g. 00:01 the next day
  6. Click "Enter" on the notification and make numerical entry
  7. 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

leopoldsedev avatar Mar 03 '22 11:03 leopoldsedev

Thank you for the detailed bug report, @leopoldsedev. I was able to reproduce it.

iSoron avatar Mar 22 '22 06:03 iSoron