Time
Stores and manages time entries logged against projects and tasks. It allows for querying, inserting, updating, and deleting time records, which are essential for billing and resource management.
Table-Specific Information
Creating Time
A Time must be created with a ProjectId, TaskId, UserId, Date and Duration. An optional description may also be provided:
INSERT INTO Time (ProjectId, TaskId, UserId, Date, Duration, Description) VALUES ('1de78bad-5a81-4cb8-ab53-5a1a3bc73b29', 'd15810a1-9324-4765-a357-80d160a0b87c', '312b124b-f33f-4cfe-a831-20eb290610d6', '2019-10-01', 250, 'Paved northwest section')
Updating Time
Once a Time has been created, its UserId, Date, Duration or Description may be updated:
UPDATE Time SET Date = '2019-11-01', Duration = 350 WHERE Id = '1de78bad-5a81-4cb8-ab53-5a1a3bc73b29/cb53829a-31ca-4760-a2a7-5a2a46e67cfb'
Deleting Time
Time may also be deleted by specifying their Id:
DELETE FROM Time WHERE Id = '1de78bad-5a81-4cb8-ab53-5a1a3bc73b29/cb53829a-31ca-4760-a2a7-5a2a46e67cfb'
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | False |
A unique combination of the project and time entry identifiers, used to uniquely reference a specific time entry record within the system. This ensures that each time entry is distinguishable even if there are multiple entries for the same project or task. |
| TimeEntryId | String | True |
The unique Xero identifier of the time entry, automatically assigned by Xero to track and reference time entries in the system. |
| UserId | String | False |
The ID of the user who logged the time entry, providing a link between the time entry and the employee or contractor who recorded the work hours. |
| ProjectId | String | False |
The ID of the project the task belongs to, linking the time entry to a specific project and ensuring accurate project tracking for billing or reporting purposes. |
| TaskId | String | False |
The ID of the task the time is logged for, allowing detailed tracking of time spent on individual tasks within a larger project. |
| Date | Date | False |
The day the time was logged for, indicating when the work was performed. This is important for proper billing, time management, and project tracking. |
| DateEntered | Datetime | True |
When the time entry was created, recording the exact date and time the time entry was logged into the system for reference and auditing purposes. |
| Duration | Int | False |
The duration of the time logged, typically measured in minutes or hours, representing the length of time the user worked on the task or project. |
| Description | String | False |
A brief description of the time entry, providing context for the work performed, the nature of the task, or any relevant details to accompany the time entry. |
| Status | String | True |
The current status of the time entry. Values can be one of the following: 'ACTIVE' (still open and editable), 'LOCKED' (finalized and no longer editable), or 'INVOICED' (already invoiced and accounted for). |
| TenantId | String | False |
The ID of the tenant to query instead of the connection tenant, allowing the system to identify which organization's data to query when working with multiple tenants. |