Update time entry
update_time_entryCorrect a logged time entry by updating its duration, date, activity, or comment. Only the fields you specify are changed, preserving the rest.
Instructions
Correct an existing time entry.
Use it for the everyday fixes: wrong duration, wrong day, wrong activity, a comment that needs to say what actually happened. Only the parameters you pass are written; everything else is left exactly as it is.
Returns the updated entry in the same shape log_time returns.
Pitfalls. What can be moved between entries is limited: the work package
and the project a time entry belongs to are not editable here —
delete the entry and log it again where it belongs. Some instances
report a lock_version for time entries and some do not; this tool
reads the entry first and only echoes a lock version when one exists, so
a concurrent edit surfaces as a conflict error with the fresh state
rather than silently overwriting a colleague's correction. Editing time
inside a closed cost-reporting period is refused by OpenProject with a
validation error.
Cross-references: find the id with list_time_entries; remove the
entry entirely with delete_time_entry; the valid activity names come
from get_project_metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hours | No | New duration in hours as a float (1.5 = 1h30). Omit to leave it. | |
| comment | No | New comment text. Pass an empty string to clear it; omit to leave the existing comment untouched. | |
| activity | No | New activity as a name or numeric id. Names are resolved against the entry's own form, so an unknown one fails with the valid ones listed. | |
| spent_on | No | New spent-on date, ISO YYYY-MM-DD. Omit to leave it. | |
| time_entry_id | Yes | Id of the entry to correct. It comes from list_time_entries or from the log_time result — it is not a work package id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Time entry id. Feed it to update_time_entry or delete_time_entry. | |
| user | No | User the time is booked for. | |
| hours | No | Logged duration in hours as a float (1.5 = one and a half hours), converted from OpenProject's ISO 8601 duration. | |
| comment | No | Free-text comment as entered (raw); html is dropped. | |
| project | No | Project the entry belongs to. | |
| activity | No | Time-entry activity (Development, Management, …); instance-defined. | |
| spent_on | No | The date the work was done, ISO YYYY-MM-DD. | |
| created_at | No | ISO 8601 UTC timestamp. | |
| updated_at | No | ISO 8601 UTC timestamp. | |
| lock_version | No | Optimistic-locking version, when this instance reports one for time entries; null means the resource is updated without a lock version. | |
| work_package | No | Work package the time is booked on; null for project-level entries. |