List time entries
list_time_entriesList filtered time entries with optional accurate totals to determine how much time was spent on a specific work package, project, user, or date range.
Instructions
List logged time, filtered server-side, with an optional accurate total.
Answers "how much time went into this ticket?" or "how much did the team spend on
project X in June?". Filters combine with AND, so project_id + user='me' + a date
range is one call.
Returns the standard list envelope: items of {id, hours, spent_on, comment, user, activity, work_package, project} plus pagination.
hours is a float (1.5 = 1h30), never an ISO duration. With
sum_hours=true, the envelope also carries sums.total_hours over
all matches and a groups bucket per activity with its own
count/sums.total_hours — both over the whole filtered set, so
never add pages up yourself.
Pitfalls. Without view-all-time-entries you see only your own entries, so a small
total may mean "not allowed to see" rather than "nobody booked time". work_package_id
scopes to that one work package — child work packages are not included; a
parent's roll-up needs a query per child. Summing stops at 2000 entries, noted in
notes; narrow the range or project rather than trusting the number.
Cross-references: book time with log_time; correct with update_time_entry,
remove with delete_time_entry; activity ids/names from get_project_metadata;
the work package from get_work_package.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-based page number. | |
| user | No | Whose time to list: numeric user id, or 'me'. Omit for everyone you're permitted to see. | |
| to_date | No | Latest spent-on date, ISO YYYY-MM-DD, inclusive. | |
| fetch_all | No | Aggregate every page into one result instead of page 1. Capped at 500 items (noted when it bites); mutually exclusive with page. sum_hours already reads every entry regardless. | |
| from_date | No | Earliest spent-on date, ISO YYYY-MM-DD, inclusive; combine with to_date for a range (either bound optional). | |
| page_size | No | Entries per page (max 100); the instance may clamp lower, reported in pagination. | |
| sum_hours | No | Accurate total over every matching entry (not just this page), broken down per activity. One request per 100 matches, capped at 2000 (noted if hit). Leave false for rows only. | |
| project_id | No | Only entries in this project (numeric id or identifier; from list_projects), including project-level entries with no work package. | |
| activity_id | No | Only entries booked on this activity; ids are instance-specific, from get_project_metadata(project_id=...). | |
| work_package_id | No | Only entries on this work package; ids from search_work_packages / list_work_packages. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sums | No | Present only when show_sums was requested. | |
| items | No | The page of results. | |
| notes | No | Degradation markers: capped aggregations, unavailable modules, … | |
| groups | No | Present only when group_by was requested. | |
| pagination | Yes | Total/page/page_size/has_more. |