Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions compiler_admin/commands/time/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def prior_month_start():
)
@click.option(
"--all",
"billable",
"include_all",
is_flag=True,
default=True,
default=False,
help="Download all time entries. The default is to download only billable time entries.",
)
@click.option(
Expand Down Expand Up @@ -91,7 +91,7 @@ def download(
start: datetime,
end: datetime,
output: str = "",
billable: bool = True,
include_all: bool = False,
client_ids: List[int] = [],
project_ids: List[int] = [],
task_ids: List[int] = [],
Expand All @@ -103,8 +103,10 @@ def download(

params = dict(start_date=start, end_date=end, output_path=output, output_cols=TOGGL_COLUMNS)

if billable:
params.update(dict(billable=billable))
# By default include billable=True in params.
# If --all was passed, do not add billable so callers can treat absence as "all".
if not include_all:
params.update(dict(billable=True))
if client_ids:
params.update(dict(client_ids=client_ids))
if project_ids:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = [
]
requires-python = ">=3.11"
dependencies = [
"click==8.2.1",
"click==8.3.1",
"gam7==7.29.4",
"pandas==2.3.3",
"tzdata",
Expand Down
Loading