Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

add start time & end time to time entry to api docs

Klaus Zanders68a55868f3ba
diff --git a/docs/api/apiv3/components/schemas/time_entry_collection_model.yml b/docs/api/apiv3/components/schemas/time_entry_collection_model.yml
index ed942c2b55a..b3d204ece0d 100644
--- a/docs/api/apiv3/components/schemas/time_entry_collection_model.yml
+++ b/docs/api/apiv3/components/schemas/time_entry_collection_model.yml
@@ -2,7 +2,7 @@
---
type: object
allOf:
- - $ref: './collection_model.yml'
+ - $ref: "./collection_model.yml"
- type: object
required:
- _links
@@ -28,7 +28,7 @@ allOf:
elements:
type: array
items:
- $ref: './time_entry_model.yml'
+ $ref: "./time_entry_model.yml"
examples:
- _type: Collection
@@ -44,10 +44,12 @@ examples:
format: plain
raw: Some comment
html: "<p>Some comment</p>"
- spentOn: '2015-03-20'
+ spentOn: "2015-03-20"
hours: PT5H
- createdAt: '2015-03-20T12:56:56.803Z'
- updatedAt: '2015-03-20T12:56:56.803Z'
+ startTime: "2015-03-20T10:00:00.000Z"
+ endTime: "2015-03-20T15:00:00.000Z"
+ createdAt: "2015-03-20T12:56:56.803Z"
+ updatedAt: "2015-03-20T12:56:56.803Z"
_links:
self:
href: "/api/v3/time_entries/1"
@@ -75,10 +77,12 @@ examples:
format: plain
raw: Another comment
html: "<p>Another comment</p>"
- spentOn: '2015-03-21'
+ spentOn: "2015-03-21"
hours: PT7H
- createdAt: '2015-03-20T12:56:56.569Z'
- updatedAt: '2015-03-20T12:56:56.371Z'
+ startTime: "2015-03-20T15:00:00.000Z"
+ endTime: "2015-03-20T22:00:00.000Z"
+ createdAt: "2015-03-20T12:56:56.569Z"
+ updatedAt: "2015-03-20T12:56:56.371Z"
_links:
self:
href: "/api/v3/time_entries/2"
diff --git a/docs/api/apiv3/components/schemas/time_entry_model.yml b/docs/api/apiv3/components/schemas/time_entry_model.yml
index 77bb87788a6..ff06786db82 100644
--- a/docs/api/apiv3/components/schemas/time_entry_model.yml
+++ b/docs/api/apiv3/components/schemas/time_entry_model.yml
@@ -8,7 +8,7 @@ properties:
minimum: 1
comment:
allOf:
- - $ref: './formattable.yml'
+ - $ref: "./formattable.yml"
- description: A comment to the time entry
spentOn:
type: string
@@ -25,6 +25,24 @@ properties:
type: string
format: date-time
description: The time the time entry was created
+ startTime:
+ type: string
+ format: date-time
+ description: |-
+ The time the time entry was started, or null if the time entry does not have a start time.
+
+ The time is returned as UTC time, if presented to the user it should be converted to the user's timezone.
+
+ This field is only available if the global `allow_tracking_start_and_end_times` setting is enabled.
+ endTime:
+ type: string
+ format: date-time
+ description: |-
+ The time the time entry was ended, or null if the time entry does not have a start time.
+
+ The time is returned as UTC time, if presented to the user it should be converted to the user's timezone.
+
+ This field is only available if the global `allow_tracking_start_and_end_times` setting is enabled.
updatedAt:
type: string
format: date-time
@@ -39,14 +57,14 @@ properties:
properties:
self:
allOf:
- - "$ref": './link.yml'
+ - "$ref": "./link.yml"
- description: |-
This time entry
**Resource**: TimeEntry
updateImmediately:
allOf:
- - "$ref": './link.yml'
+ - "$ref": "./link.yml"
- description: |-
Directly perform edits on this time entry
@@ -55,7 +73,7 @@ properties:
**Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user
update:
allOf:
- - "$ref": './link.yml'
+ - "$ref": "./link.yml"
- description: |-
Form endpoint that aids in preparing and performing edits on a TimeEntry
@@ -64,7 +82,7 @@ properties:
**Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user
delete:
allOf:
- - "$ref": './link.yml'
+ - "$ref": "./link.yml"
- description: |-
Delete this time entry
@@ -73,35 +91,35 @@ properties:
**Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user
schema:
allOf:
- - "$ref": './link.yml'
+ - "$ref": "./link.yml"
- description: |-
The time entry schema
**Resource**: Schema
project:
allOf:
- - "$ref": './link.yml'
+ - "$ref": "./link.yml"
- description: |-
The project the time entry is bundled in. The project might be different from the work package's project once the workPackage is moved.
**Resource**: Project
workPackage:
allOf:
- - "$ref": './link.yml'
+ - "$ref": "./link.yml"
- description: |-
The work package the time entry is created on
**Resource**: WorkPackage
user:
allOf:
- - "$ref": './link.yml'
+ - "$ref": "./link.yml"
- description: |-
The user the time entry tracks expenditures for
**Resource**: User
activity:
allOf:
- - "$ref": './link.yml'
+ - "$ref": "./link.yml"
- description: |-
The time entry activity the time entry is categorized as
@@ -114,33 +132,35 @@ examples:
format: plain
raw: "The force shall set me free."
html: "<p>The force shall set me free.</p>"
- spentOn: '2023-01-11'
- hours: 'PT4H'
- createdAt: '2023-01-11T13:58:24.927Z'
- updatedAt: '2023-01-11T13:58:24.927Z'
+ spentOn: "2023-01-11"
+ hours: "PT4H"
+ startTime: "2023-01-11T09:58:00.000Z"
+ endTime: "2023-01-11T13:58:00.000Z"
+ createdAt: "2023-01-11T13:58:24.927Z"
+ updatedAt: "2023-01-11T13:58:24.927Z"
_links:
self:
- href: '/api/v3/time_entries/42'
+ href: "/api/v3/time_entries/42"
updateImmediately:
- href: '/api/v3/time_entries/42'
+ href: "/api/v3/time_entries/42"
method: patch
update:
- href: '/api/v3/time_entries/42/form'
+ href: "/api/v3/time_entries/42/form"
method: post
delete:
- href: '/api/v3/time_entries/42'
+ href: "/api/v3/time_entries/42"
method: delete
schema:
- href: '/api/v3/time_entries/schema'
+ href: "/api/v3/time_entries/schema"
project:
- href: '/api/v3/projects/11'
+ href: "/api/v3/projects/11"
title: DeathStarV2
workPackage:
- href: '/api/v3/work_packages/77'
+ href: "/api/v3/work_packages/77"
title: Build new hangar
user:
- href: '/api/v3/users/3'
+ href: "/api/v3/users/3"
title: Darth Vader
activity:
- href: '/api/v3/time_entries/activities/1'
+ href: "/api/v3/time_entries/activities/1"
title: Management