Operations with Specific IssueWorkItem
This resource lets you work with work items in the specific issue.
Resource |
|
---|---|
Returned entity | IssueWorkItem. For the description of the entity attributes, see Supported Fields section. |
Supported methods |
Represents a work item in an issue.
Below you can find the list of resources that let you work with this entity.
Extends BaseWorkItem
This table describes attributes of the IssueWorkItem
entity.
To receive an attribute in the response from the server, specify it explicitly in the
fields
request parameter.To update an attribute, provide it in the body of a POST request.
Field | Type | Description |
---|---|---|
id | String | The ID of the issue work item. |
author | The user to whom the work is attributed in the work item. | |
creator | The user who added the work item to the issue. | |
text | String | The work item description. |
textPreview | String | Parsed preview of the description. |
type | The work item type. | |
created | Long | The timestamp in milliseconds indicating the moment when the work item was created. Stored as a unix timestamp at UTC. |
updated | Long | The timestamp in milliseconds indicating the last update of the work item. Stored as a unix timestamp at UTC. |
duration | The duration of the work item. | |
date | Long | The timestamp in milliseconds indicating the date and time of the work item. Stored as a Unix timestamp in UTC. The time part is set to midnight for the current date. |
issue | Stores attributes of the issue to which the work item is attached. | |
attributes | The list of attributes of the work item. |
Get the specific work item of the issue.
Requires access to the issue work item is added to and Read Work Item permission.
GET /api/issues/{issueID}/timeTracking/workItems/{itemID}?{fields}
{itemID} | Database ID of the work item. |
---|
Parameter | Type | Description |
---|---|---|
fields | String | A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the |
https://example.youtrack.cloud/api/issues/2-35/timeTracking/workItems/115-7?fields=author(id,name),creator(id,name),date,duration(id,minutes,presentation),id,name,type(id,name)
{
"date": 1538956800000,
"duration": {
"id": "120",
"minutes": 120,
"presentation": "2h",
"$type": "DurationValue"
},
"type": {
"name": "Testing",
"id": "65-1",
"$type": "WorkItemType"
},
"creator": {
"name": "John Doe",
"id": "1-2",
"$type": "User"
},
"author": {
"name": "Jane Doe",
"id": "1-3",
"$type": "User"
},
"id": "115-7",
"$type": "IssueWorkItem"
}
Update the specific work item of the issue.
Requires Update Work Item permission if work item was created by the user and Update Not Own Work Item otherwise.
POST /api/issues/{issueID}/timeTracking/workItems/{itemID}?{fields}&{muteUpdateNotifications}
{itemID} | Database ID of the work item. |
---|
Parameter | Type | Description |
---|---|---|
fields | String | A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the |
muteUpdateNotifications | Boolean | Set this parameter to |
https://example.youtrack.cloud/api/issues/2-35/timeTracking/workItems/124-222?fields=author(id,name),creator(id,name),date,duration(id,minutes,presentation),id,name,text,type(id,name)
{
"duration": {
"minutes": 150
},
"type": {
"id": "65-2"
}
}
{
"duration": {
"presentation": "2h 30m",
"minutes": 150,
"id": "150",
"$type": "DurationValue"
},
"date": 1538956800000,
"type": {
"name": "Testing",
"id": "65-2",
"$type": "WorkItemType"
},
"text": "I keep on testing *samples*.",
"author": {
"name": "Minnie Terry",
"id": "24-0",
"$type": "User"
},
"creator": {
"name": "Minnie Terry",
"id": "24-0",
"$type": "User"
},
"id": "124-222",
"$type": "IssueWorkItem"
}
Delete the specific work item in the issue.
Requires Update Work Item permission if work item was created by the user and Update Not Own Work Item otherwise.
DELETE /api/issues/{issueID}/timeTracking/workItems/{itemID}
{itemID} | Database ID of the work item. |
---|
Parameter | Type | Description |
---|---|---|
fields | String | A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the |
https://example.youtrack.cloud/api/issues/2-35/timeTracking/workItems/115-7