llms.txt : 機械可読形式のドキュメント索引。このページの Markdown バージョンも利用可能です。

YouTrack 開発者ポータルヘルプ

作業項目を発行する

このリソースを使用すると、特定の課題の作業項目を操作できます。

リソース

/api/issues/{issueID}/timeTracking/workItems

返されたエンティティ

IssueWorkItem。エンティティ属性の説明については、サポートされているフィールドセクションを参照してください。

サポートされているメソッド

IssueWorkItem の属性

課題の作業項目を表します。

Related Resources

以下に、このエンティティを操作できるリソースのリストを示します。

BaseWorkItem を拡張

Attributes

このテーブルは、IssueWorkItem エンティティの属性について説明しています。

  • サーバーからの応答で属性を受け取るには、fields 要求パラメーターでその属性を明示的に指定してください。

  • 属性を更新するには、POST リクエストの本文にそれを指定します。

フィールド

タイプ

説明

id

文字列

課題の作業項目の ID。Read-only

作成者

ユーザー

作業項目で作業が割り当てられているユーザー。Can be null

クリエーター

ユーザー

課題に作業項目を追加したユーザー。Read-only Can be null

テキスト

文字列

作業項目の説明。Can be null

textPreview

文字列

説明の解析されたプレビュー。Read-only

型

WorkItemType

作業項目のタイプ。Can be null

作成しました

Long

作業項目が作成された時刻を示すミリ秒単位のタイムスタンプ。UTC の UNIX タイムスタンプとして保存されます。

更新日

Long

作業項目の最終更新を示すミリ秒単位のタイムスタンプ。UTC の UNIX タイムスタンプとして保存されます。Can be null

期間

DurationValue

ワークアイテムの期間。

日付

Long

作業項目の日付と時刻を示すタイムスタンプ (ミリ秒単位)。UTC の Unix タイムスタンプとして保存されます。時刻部分は現在の日付の午前 0 時に設定されます。

課題

課題

作業項目が添付されている課題の属性を保存します。Read-only

属性

WorkItemAttributes の配列

作業項目の属性のリスト。Read-only

IssueWorkItem のリストを読む

特定の課題のすべての作業項目のリストを取得します。

Request syntax

GET /api/issues/{issueID}/timeTracking/workItems?{fields}&{$top}&{$skip}

null

IssueWorkItem のデータベース ID

Request parameters

パラメーター

タイプ

説明

フィールド

文字列

応答で返される必要がある IssueWorkItem 属性のリスト。フィールドが指定されていない場合、entityID のみが返されます。

$skip

Int

オプション。最初のエンティティを返す前にスキップする、返されるエンティティ数を設定できます。

$top

Int

オプション。応答で返されるエントリの最大数を指定できます。$top 値を設定しない場合、サーバーは返されるエントリの最大数を制限します。

サーバーは、コレクションを返すほとんどのリソースに対して最大 42 のエントリを返します。詳細については、「ページ付け」を参照してください。

Sample

サンプルリクエスト

https://example.youtrack.cloud/api/issues/2-35/timeTracking/workItems?fields=author(id,name),creator(id,name),date,duration(id,minutes,presentation),id,name,text,type(id,name)

応答本文のサンプル

[ { "date": 1536278400000, "duration": { "id": "300", "minutes": 300, "presentation": "5h", "$type": "DurationValue" }, "type": { "name": "Testing", "id": "65-1", "$type": "WorkItemType" }, "text": "almost there", "creator": { "name": "John Smith", "id": "1-1", "$type": "User" }, "author": { "name": "John Smith", "id": "1-1", "$type": "User" }, "id": "115-0", "$type": "IssueWorkItem" }, { "date": 1538956800000, "duration": { "id": "60", "minutes": 60, "presentation": "1h", "$type": "DurationValue" }, "type": { "name": "Documentation", "id": "65-2", "$type": "WorkItemType" }, "text": "added a document for internal parameters. check wiki for details", "creator": { "name": "John Doe", "id": "1-2", "$type": "User" }, "author": { "name": "Jane Doe", "id": "1-3", "$type": "User" }, "id": "115-2", "$type": "IssueWorkItem" }, { "date": 1538956800000, "duration": { "id": "120", "minutes": 120, "presentation": "2h", "$type": "DurationValue" }, "type": { "name": "Testing", "id": "65-1", "$type": "WorkItemType" }, "text": null, "creator": { "name": "John Doe", "id": "1-2", "$type": "User" }, "author": { "name": "John Doe", "id": "1-2", "$type": "User" }, "id": "115-5", "$type": "IssueWorkItem" }, { "date": 1538956800000, "duration": { "id": "120", "minutes": 120, "presentation": "2h", "$type": "DurationValue" }, "type": { "name": "Testing", "id": "65-1", "$type": "WorkItemType" }, "text": null, "creator": { "name": "John Doe", "id": "1-2", "$type": "User" }, "author": { "name": "Jane Doe", "id": "1-3", "$type": "User" }, "id": "115-6", "$type": "IssueWorkItem" }, { "date": 1538956800000, "duration": { "id": "120", "minutes": 120, "presentation": "2h", "$type": "DurationValue" }, "type": { "name": "Testing", "id": "65-1", "$type": "WorkItemType" }, "text": null, "creator": { "name": "John Doe", "id": "1-2", "$type": "User" }, "author": { "name": "Jane Doe", "id": "1-3", "$type": "User" }, "id": "115-7", "$type": "IssueWorkItem" } ]

新しい IssueWorkItem を追加する

課題に新しい作業項目を追加します。

必須フィールド: duration (minutes または presentation)。

Request syntax

POST /api/issues/{issueID}/timeTracking/workItems?{fields}&{muteUpdateNotifications}

null

IssueWorkItem のデータベース ID

Request parameters

パラメーター

タイプ

説明

フィールド

文字列

応答で返される必要がある IssueWorkItem 属性のリスト。フィールドが指定されていない場合、entityID のみが返されます。

muteUpdateNotifications

Boolean

このリクエストによって行われた変更について通知を送信しない場合は、このパラメーターを true に設定します。これは、ワークフロールールによって送信された通知をミュートしません。このパラメーターを使用するには、要求の影響を受けるすべてのプロジェクトでコマンドをサイレントに適用する許可が必要です。2021.3 以降で利用可能。

Sample

サンプルリクエスト

https://example.youtrack.cloud/api/issues/2-35/timeTracking/workItems?fields=author(id,name),creator(id,name),date,duration(id,minutes,presentation),id,name,text,type(id,name)

サンプルリクエストボディ

{ "text": "I keep on testing *samples*.", "date": 1539000000000, "author": { "id": "24-0" }, "duration": { "minutes": 120 }, "type": { "id": "49-0" } }

応答本文のサンプル

{ "duration": { "presentation": "2h", "minutes": 120, "id": "120", "$type": "DurationValue" }, "date": 1538956800000, "type": { "name": "Development", "id": "49-0", "$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" }
2026 年 3 月 24 日