Razeeman / Android-SimpleTimeTracker

Simple app that tracks time.
GNU General Public License v3.0
536 stars 68 forks source link

[Bug] Overwriting activity with "Change" doesn't work correctly #160

Closed 1over137 closed 3 weeks ago

1over137 commented 4 months ago

Once again thanks for the amazing app. I've had great use it for the past 2 years.

To reproduce:

  1. Start an activity A 10 minutes in the past
  2. Start another activity B 2 minutes in the past, changing the end time of the first
  3. Start another activity C 5 minutes in the past, changing the end time of previous activity

Current behavior: A: 10:07-10:13 B: 10:11-10:11 C: 10:11- (continuing)

I assume if you are using this change previous activity feature, the desired effect would be to actually completely delete activity B and change the end time of activity A to match the new start time of C, like the following:

Expected behavior: A: 10:07-10:11 C: 10:11- (continuing)

I understand these edge cases are difficult to get right. To prevent bugs like this in the future, I wonder if you can add a "Strict no multitasking" mode, which would add a validation hook when you perform any edit such that overlapping entries cannot be created at all. Going through my records, I found quite some of these unintended overlapping entries, some of which due to bugs, others due to my mistake. It would be nice if this can be prevented at the software level.

Razeeman commented 2 months ago

Hello! Thank you for the feedback. It would be changed as you described in the next update. It will look something like this

image
1over137 commented 3 weeks ago

Thanks for the work, it seems to be working correctly now.

I think the display is a little misleading though. It would be better to change the right column of the removed activity to empty space or a trash can icon to indicate it is getting removed.

Also, it is weird that the earlier activity is affected even though there is no overlap. If the records are not touching, I don't think it would be the desired behavior to change the end of the previous activity.

Razeeman commented 3 weeks ago

Agree about the indication of removed activities, will work on that.