You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you edit a record's start timestamp (for example, changing the minutes of the record), you can no longer edit it using the timestamp as a key.
How to reproduce:
> timetrace create project dummy
✔️ Created project dummy
> timetrace start dummy
✔️ Started tracking time
> timetrace stop
✔️ Stopped tracking time
> timetrace list records today
+-----+------------------+---------------+---------+-------+------------+--------+
| # | KEY | PROJECT | START | END | BILLABLE | TAGS |
+-----+------------------+---------------+---------+-------+------------+--------+
| 4 | 2024-02-05-16-57 | dummy | 16:57 | 16:57 | no | |
...
> timetrace edit 2024-02-05-16-57
In the editor, change the start time from 16:57 to 16:55
{
"start": "2024-02-05T16:5755:24.5205026+01:00",
"end": "2024-02-05T16:57:34.8433413+01:00",
"project": {
"key": "dummy"
},
"is_billable": false,
"tags": []
}
> timetrace list records today
+-----+------------------+---------------+---------+-------+------------+--------+
| # | KEY | PROJECT | START | END | BILLABLE | TAGS |
+-----+------------------+---------------+---------+-------+------------+--------+
| 4 | 2024-02-05-16-55 | dummy | 16:55 | 16:57 | no | |
...
> timetrace edit record 2024-02-05-16-55
❗ failed to backup record before edit: record not found
The issue seems to be that the record file is still named 16-57 in the 2024-02-05 folder, so the edit command cannot find the file. Indeed if you try to edit using timetrace edit record 2024-02-05-16-57, you can still edit the record normally.
I see 2 possible solutions:
after editing the record, rename the file to match the new record start time
maintain the file name, and display it as the key of the record, which in the example above would look like the below (note the key and start times are no longer similar)
> timetrace list records today
+-----+------------------+---------------+---------+-------+------------+--------+
| # | KEY | PROJECT | START | END | BILLABLE | TAGS |
+-----+------------------+---------------+---------+-------+------------+--------+
| 4 | 2024-02-05-16-57 | dummy | 16:55 | 16:57 | no | |
The text was updated successfully, but these errors were encountered:
pedroangelini
changed the title
[bug] Cannot edit a record that had it's initial timestamp edited
[bug] Cannot edit a record that had its initial timestamp edited
Feb 5, 2024
If you edit a record's start timestamp (for example, changing the minutes of the record), you can no longer edit it using the timestamp as a key.
How to reproduce:
In the editor, change the start time from 16:57 to 16:55
{
"start": "2024-02-05T16:
5755:24.5205026+01:00","end": "2024-02-05T16:57:34.8433413+01:00",
"project": {
"key": "dummy"
},
"is_billable": false,
"tags": []
}
The issue seems to be that the record file is still named 16-57 in the 2024-02-05 folder, so the
edit
command cannot find the file. Indeed if you try to edit usingtimetrace edit record 2024-02-05-16-57
, you can still edit the record normally.I see 2 possible solutions:
The text was updated successfully, but these errors were encountered: