Classes
Methods
# async create(timeEntry) → {Promise.<TimeEntry>}
Creates a new time entry. Depending on the time entry, the calling users has to have several permissions to create the time entry. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs permissions on: 'project-planning-data' if it is a project task.
Parameters:
Name | Type | Description |
---|---|---|
timeEntry |
TimeEntryCreateModel
|
The model to create a time entry. |
Promise.<TimeEntry>
# async delete(timeEntryId) → {Promise.<void>}
Deletes the time entry with the specified id. Depending on the time entry, the calling users has to have several permissions to delete the time entry. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs permissions on: 'project-planning-data' if it is a project task. If the time entry is billed, Admin permissions are required.
Parameters:
Name | Type | Description |
---|---|---|
timeEntryId |
String
|
The id of the time entry. |
Promise.<void>
# async deleteTimeEntries(timeEntry) → {Promise.<void>}
Deletes the time entries with the specified ids. Depending on the time entry, the calling users has to have several permissions to delete the time entries. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs permissions on: 'project-planning-data' if it is a project task. If the time entry is billed, Admin permissions are required.
Parameters:
Name | Type | Description |
---|---|---|
timeEntry |
Array.<String>
|
The ids of the time entries, which should be deleted. |
Promise.<void>
# async get(timeEntryId) → {Promise.<TimeEntry>}
Returns the time entry with the specified id. Depending on the time entry, the calling users has to have several permissions to get the time entry. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs permissions on: 'project-planning-data' if it is a project task.
Parameters:
Name | Type | Description |
---|---|---|
timeEntryId |
String
|
The id of the time entry. |
Promise.<TimeEntry>
# async lastTimeEntries(optionsopt) → {Promise.<Array.<TimeEntry>>}
Returns the last time entry of each user. The last time entry of each user is always the last one that was started. Time entires which are started in the future are ignored. If a time entry does not have a start time, 12.00 am is automatically assumed as the start time for comparison with other time entries from the same day.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
ListOptions
|
<optional> |
Pagination and filtering options |
Promise.<Array.<TimeEntry>>
# async list(options) → {Promise.<Array.<TimeEntry>>}
Returns all time entries. Depending on the time entry, the calling users has to have several permissions to get the time entry. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs permissions on: 'project-planning-data' if it is a project task.
Parameters:
Name | Type | Description |
---|---|---|
options |
Promise.<Array.<TimeEntry>>
# async setBillable(timeEntry) → {Promise.<void>}
Sets the time entries with the specified ids to billable. Depending on the time entry, the calling users has to have several permissions to edit the time entries. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs 'write' permissions on: 'project-timetracking' if it is a project task.
Parameters:
Name | Type | Description |
---|---|---|
timeEntry |
Array.<String>
|
The ids of the time entries, which should be set to billable. |
Promise.<void>
# async setBilled(timeEntry) → {Promise.<void>}
Sets the time entries with the specified ids to billed. Depending on the time entry, the calling users has to have several permissions to edit the time entries. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs permissions on: 'project-planning-data' if it is a project task. If the time entry is billed, the permissions can be ignored because there is no change.
Parameters:
Name | Type | Description |
---|---|---|
timeEntry |
Array.<String>
|
The ids of the time entries, which should be set to billed. |
Promise.<void>
# async setTypeOfWork(timeEntry) → {Promise.<void>}
Sets the type of work of the specified timeentries. Depending on the time entry, the calling users has to have several permissions to edit the time entries. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs permissions on: 'project-planning-data' if it is a project task.
Parameters:
Name | Type | Description |
---|---|---|
timeEntry |
SetTypeOfWorkModel
|
The model of ids of time entries. |
Promise.<void>
# async setUnbillable(timeEntry) → {Promise.<void>}
Sets the time entries with the specified ids to unbillable. Already billed time entries cannot be set to unbillable -> Badrequest Depending on the time entry, the calling users has to have several permissions to edit the time entries. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs write permissions on: 'project-timetracking' if it is a project task.
Parameters:
Name | Type | Description |
---|---|---|
timeEntry |
Array.<String>
|
The ids of the time entries, which should be set to unbillable. |
Promise.<void>
# async setUnbilled(timeEntry) → {Promise.<void>}
Sets the time entries with the specified ids to unbilled. For setting already billed time entries to unbilled, the user needs to have admin permissions.
Parameters:
Name | Type | Description |
---|---|---|
timeEntry |
Array.<String>
|
The ids of the time entries, which should be set to unbilled. |
Promise.<void>
# async update(timeEntryId, timeEntry) → {Promise.<TimeEntry>}
Updates the time entry with the specified id. Depending on the time entry, the calling users has to have several permissions to update the time entry. No permissions are required if the calling user is owner of this time entry. If the calling user is not the creator of the time entry and the time entry is connected to a project, 'write' permissions on the 'project-timetracking' feature are necessary. If the time entry is connected to a task, the user needs to be assignee of this task or the user needs permissions on: 'project-planning-data' if it is a project task.
Parameters:
Name | Type | Description |
---|---|---|
timeEntryId |
String
|
The id of the time entry. |
timeEntry |
TimeEntryUpdateModel
|
The model to update the time entry with the specified id. |
Promise.<TimeEntry>