YouTrack Standalone 2019.3 Help

Operations with Specific ProjectTimeTrackingSettings

This resource lets you configure the time tracking settings for the specific project.

Resource

/api/admin/projects/{projectID}/timeTrackingSettings

Returned entity

ProjectTimeTrackingSettings. For the description of the entity attributes, see Supported Fields section.

Supported methods

ProjectTimeTrackingSettings attributes

Represents time tracking settings of the project.

This table describes attributes of the ProjectTimeTrackingSettings entity.

  • To receive an attribute in the response from server, specify it explicitly in the request parameter fields.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

enabled

Boolean

When true, the time tracking in the project is enabled. Otherwise, false.

estimate

ProjectCustomField

The custom field that is used for estimation in the project. The field must be attached to the project. Can be null.

timeSpent

ProjectCustomField

The custom field that is used for estimation in the project. The field must be attached to the project. Can be null.

workItemTypes

Array of WorkItemTypes

A collection of work item types that are used in the project.

project

Project

Reference to the project, to which these settings belong to. Read-only. Can be null.

Read a Specific ProjectTimeTrackingSettings

Read the time tracking settings of the project.

Required permissions

Requires Read Project Basic permission.

Request syntax

GET /api/admin/projects/{projectID}/timeTrackingSettings?{fields}

Request parameters

Parameter

Type

Description

fields

String

A list of ProjectTimeTrackingSettings attributes that should be returned in the response. If no field is specified,only the entityID is returned

Sample

Sample request URI

https://example.myjetbrains.com/youtrack/api/admin/projects/0-3/timeTrackingSettings?fields=enabled,estimate(field(id,name),id),timeSpent(field(id,name),id),workItemTypes(id,name,autoAttached)

Sample response body

{ "enabled": true, "workItemTypes": [ { "name": "Development", "autoAttached": true, "id": "65-0", "$type": "WorkItemType" }, { "name": "Testing", "autoAttached": true, "id": "65-1", "$type": "WorkItemType" }, { "name": "Documentation", "autoAttached": false, "id": "65-2", "$type": "WorkItemType" } ], "estimate": null, "timeSpent": { "field": { "name": "Spent time", "id": "58-10", "$type": "CustomField" }, "id": "104-1", "$type": "PeriodProjectCustomField" }, "$type": "ProjectTimeTrackingSettings" }

Update a Specific ProjectTimeTrackingSettings

Update the time tracking settings of the project.

Required permissions

Requires Update Project permission.

Request syntax

POST /api/admin/projects/{projectID}/timeTrackingSettings?{fields}

Request parameters

Parameter

Type

Description

fields

String

A list of ProjectTimeTrackingSettings attributes that should be returned in the response. If no field is specified,only the entityID is returned

Sample

Sample request URI

https://example.myjetbrains.com/youtrack/api/admin/projects/0-3/timeTrackingSettings?fields=enabled,estimate(field(id,name),id)

Sample request body

{ "estimate": { "field": { "id": "58-21" }, "id": "104-4" } }

Sample response body

{ "enabled": true, "estimate": { "field": { "name": "Estimation", "id": "58-21", "$type": "CustomField" }, "id": "104-4", "$type": "PeriodProjectCustomField" }, "$type": "ProjectTimeTrackingSettings" }
Last modified: 16 March 2020