Actions15
- Work Package Actions
- Project Actions
- Time Entry Actions
- Custom API Call Actions
Overview
This node operation creates a new time entry in OpenProject. It allows users to log the time spent on a specific work package, specifying details such as the duration in ISO 8601 format, the date the work was done, an optional comment, the activity type, and the user who logged the time. This is useful for project management and time tracking scenarios where accurate recording of work hours is essential, such as billing, resource management, or progress tracking.
Use Case Examples
- Logging 1.5 hours spent on a development task with a comment describing the work done.
- Creating a time entry for a specific date and associating it with a particular activity type and user.
Properties
| Name | Meaning |
|---|---|
| Work Package ID | The work package this time entry belongs to, selected from available work packages. |
| Hours | The time spent in ISO 8601 duration format (e.g., 'PT1H' for 1 hour, 'PT1H30M' for 1.5 hours). Must start with 'PT' followed by hours (H) and/or minutes (M). |
| Date | The date when the work was done, sent as 'spentOn' to OpenProject. |
| Comment | A comment describing the work done, providing additional context for the time entry. |
| Activity ID | The activity type for this time entry, selected from available time entry activities. |
| User ID | The user who logged this time entry. Defaults to the current user if not specified. |
Output
JSON
jsonid- The unique identifier of the created time entry.hours- The duration of time logged in ISO 8601 format.spentOn- The date the time was spent on the work package.comment
*raw- The comment describing the work done._links
*workPackage
*href- Reference link to the associated work package.
*activity
*href- Reference link to the activity type (if specified).
*user
*href- Reference link to the user who logged the time (if specified).
Dependencies
- Requires an API key credential for OpenProject API authentication.
Troubleshooting
- Ensure the 'Hours' field is correctly formatted in ISO 8601 duration format starting with 'PT'. Incorrect formatting will cause API errors.
- Verify that the 'Work Package ID' exists and is accessible with the provided credentials; otherwise, the API will reject the request.
- If specifying 'Activity ID' or 'User ID', ensure these IDs are valid and loaded correctly via the node's load options methods.
- Check for proper date formatting in the 'Date' field; it must be a valid date to be accepted by the API.
- Common error messages include invalid JSON in optional fields or missing required fields; ensure all required inputs are provided and correctly formatted.
Links
- ISO 8601 Duration Format - Reference for the ISO 8601 duration format used in the 'Hours' field.
- OpenProject API Documentation - Official API documentation for OpenProject, detailing endpoints and data structures.