Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take previous record into consideration for klog start --resume #266

Closed
jotaen opened this issue Aug 10, 2023 · 0 comments · Fixed by #275
Closed

Take previous record into consideration for klog start --resume #266

jotaen opened this issue Aug 10, 2023 · 0 comments · Fixed by #275
Labels
ENHANCEMENT Ideas and feature requests

Comments

@jotaen
Copy link
Owner

jotaen commented Aug 10, 2023

The current behaviour of klog start --resume is that it only considers the record of the current day. Even though that behaviour is most in line with the philosophy of klog to treat records as independent and self-contained units, it doesn’t seem very practical.

So I think the easiest is to change the behaviour so that the --resume flag goes back to the last entry of the last day in the file to fetch the summary for the first entry in a new record. (I.e., “chronological mode”)

Related #263.

@jotaen jotaen added the ENHANCEMENT Ideas and feature requests label Oct 6, 2023
jotaen added a commit that referenced this issue Oct 6, 2023
Resolves #266.

In case there is no record at the current date, `klog start --resume`
now falls back to the previous record for determining the last entry
summary. E.g., for this file:

```
2020-01-01
    14:00-15:00 Something
```

Say today was `2020-01-02` + `13:39`, then `klog start --resume` would
yield:

```
2020-01-01
    14:00-15:00 Something

2020-01-02
    13:39-? Something
```

Previously, the newly created entry wouldn’t have had a summary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENHANCEMENT Ideas and feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant