Skip to content

Fix record edit when start timestamp changes#252

Open
Cashie1597 wants to merge 1 commit into
dominikbraun:mainfrom
Cashie1597:fix/record-rename-after-edit
Open

Fix record edit when start timestamp changes#252
Cashie1597 wants to merge 1 commit into
dominikbraun:mainfrom
Cashie1597:fix/record-rename-after-edit

Conversation

@Cashie1597

Copy link
Copy Markdown

Fixes #246

After a manual timetrace edit record, rename the on-disk record file (and its .bak backup, if present) to match the updated start timestamp in the JSON.

Record keys shown in timetrace list records are derived from record.Start, not the filename. When those diverged, a second edit using the displayed key failed with record not found.

Includes unit tests for rename and no-op cases.

After a manual edit, rename the on-disk record (and backup) file to match
the updated start time in the JSON. Record keys shown in the CLI are derived
from record.Start, so a stale filename caused "record not found" on re-edit.

Fixes dominikbraun#246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Cannot edit a record that had its initial timestamp edited

1 participant