Open tai271828 opened 3 years ago
Correct. This should be also related to #23.
ctimer.py:line10 on_closing() is supposed to record the current clock details while halting the program. Need to be checked. controller.py:line82 db.db_add_clock-details() is also related.
To solve this problem, we need to update the database clock details only once but not to miss premature halted clocks.
I propose to fix the database to record any running period of "focus-time" and "breaks" by adding one columns and delete the "end_break" column. This means the former database needs a conversion to be compatible with the new database.
New data format A. add 1 column: "is_break" Bool & remove "end_break" column id | date | clock_count | start_clock | end_clock | is_break | task_description | reached_bool | reason
clock_count will remain the "finished focus-clock count" of the date. while is_break == True, the task_description & reached_bool & reason will be N.A.
While retrieving clock count for the year, the method does not change. While plotting --stats, the breaks taken would be plotted as different color.
This will be developed in a new branch --new_db, with the database name: ctimer_2021.db and ctimer_debug_2021.db before the merging take place.
the new branch is merged into master by commit 0f71031dea80c9ae949208a15c12cb4ce5394a5e Test cases is to be written.
Description
CTimer does not record finished clocks if their corresponding/following break does not complete.
Steps to Reproduce
Steps to reproduce the behavior:
stop
Expected Behavior
Total clocks
number continues before closing the timer.Actual Behavior
Total clocks
number does accumulate.