diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e214574..8451231f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed -- deepsource suggestions + +- deepsource suggestions +- `last` alias on `show`, `clone`, `edit` and `edit-multiple` would select future time entries if they + existed, now only time entries started before now will be considered ## [v0.54.1] - 2025-06-20 diff --git a/pkg/timeentryhlp/timeentry.go b/pkg/timeentryhlp/timeentry.go index 40684fc1..e67063bb 100644 --- a/pkg/timeentryhlp/timeentry.go +++ b/pkg/timeentryhlp/timeentry.go @@ -7,6 +7,7 @@ import ( "github.com/lucassabreu/clockify-cli/api" "github.com/lucassabreu/clockify-cli/api/dto" + "github.com/lucassabreu/clockify-cli/pkg/timehlp" "github.com/pkg/errors" ) @@ -87,10 +88,12 @@ func GetTimeEntry( } } + now := timehlp.Now() list, err := c.GetUserTimeEntries(api.GetUserTimeEntriesParam{ Workspace: workspace, UserID: userID, OnlyInProgress: onlyInProgress, + End: &now, PaginationParam: api.PaginationParam{ PageSize: 1, Page: page,