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

Filter time entries by description #18

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

zmoog
Copy link
Owner

@zmoog zmoog commented Apr 3, 2023

Motivation

I want to filter time entries by description; sometimes you want to only see entries matching a substring, keeping the total amount of time.

Here's an example:

$ tgl entries --description SDH list --start-date 2023-03-27 

  description                                       Duration
 ────────────────────────────────────────────────────────────
  SDH 3229                                          6:13
  SDH 3237                                          4:52
  SDH 3069                                          4:03
  SDH 3149                                          3:27
  SDH 3256                                          2:22
  SDH 3247                                          2:18
  SDH 3140                                          1:07
  SDH 3253                                          0:56
 ────────────────────────────────────────────────────────────
  Total                                             25:10

Change description

Add a simple --description option to filter the time entries to the entries command group, so it's available to all time entries related commands.

The API endpoint does not offer filtering capabilities, to we are performing the filtering on the client side.

Additional Notes

Closes: #16

Reviewer checklist

  • PR address a single concern.
  • PR title and description are appropriately filled.
  • Changes will be merged in main.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.
  • Docs are updated (at least the README.md, if needed).
  • History is clean, commit messages are meaningful (see CONTRIBUTING.md) and are well-formatted.

Add a simple `--description` option to filter the time entries to the
`entries` command group, so it's available to all time entries related
commands.

The API endpoint does not offer filtering capabilities, to we are
performing the filtering on the client side.

Refs: #16
@zmoog zmoog self-assigned this Apr 3, 2023
@zmoog zmoog added the enhancement New feature or request label Apr 3, 2023
@zmoog zmoog marked this pull request as ready for review April 3, 2023 06:54
@zmoog zmoog merged commit 73f189d into main Apr 3, 2023
@zmoog zmoog deleted the zmoog/filter-time-entries-by-description branch April 3, 2023 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter time entries by description
1 participant