Fields - Add
作業項目の種類にフィールドを追加します。
POST https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields?api-version=7.1-preview.2
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
organization
|
path | True |
string |
Azure DevOps 組織の名前です。 |
process
|
path | True |
string uuid |
プロセスの ID。 |
wit
|
path | True |
string |
作業項目の種類の参照名。 |
api-version
|
query | True |
string |
使う API のバージョン。 このバージョンの API を使用するには、これを '7.1-preview.2' に設定する必要があります。 |
要求本文
名前 | 型 | 説明 |
---|---|---|
allowGroups |
boolean |
グループ ID へのフィールド値の設定を許可します。 ID フィールドにのみ適用されます。 |
allowedValues |
string[] |
フィールドで使用できる値の一覧。 |
defaultValue |
object |
フィールドの既定値。 |
readOnly |
boolean |
true の場合、フィールドは編集できません。 |
referenceName |
string |
フィールドの参照名。 |
required |
boolean |
true の場合、フィールドを空にすることはできません。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
成功した操作 |
セキュリティ
oauth2
型:
oauth2
フロー:
accessCode
Authorization URL (承認 URL):
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL (トークン URL):
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
スコープ
名前 | 説明 |
---|---|
vso.work_write | 作業項目とクエリの読み取り、作成、更新、ボード メタデータの更新、読み取り領域とイテレーション パス、関連するメタデータの追跡、クエリの実行、サービス フックを介した作業項目イベントに関する通知の受信を行う機能を付与します。 |
例
Adds a field to a work item type
要求のサンプル
POST https://dev.azure.com/{organization}/_apis/work/processes/{processId}/workItemTypes/{witRefName}/fields?api-version=7.1-preview.2
{
"referenceName": "Custom.Fields.Colors",
"defaultValue": "",
"allowGroups": false
}
応答のサンプル
{
"referenceName": "Custom.Fields.Colors",
"name": "Colors",
"type": "string",
"description": "My new field",
"url": "https://dev.azure.com/fabrikamm0652/_apis/work/processes/4bab314e-358e-4bf3-9508-806ba6ac0c30/behaviors",
"customization": "custom"
}
定義
名前 | 説明 |
---|---|
Add |
作業項目の種類にフィールドを追加する要求を記述するクラス。 |
Customization |
この作業項目のカスタマイズの種類を示します。 システムの動作は親プロセスから継承されますが、変更されません。 継承された動作は、親プロセスから継承された変更された動作です。 カスタム動作は、現在のプロセスでユーザーによって作成された動作です。 |
Field |
|
Process |
作業項目の種類とそのプロパティのフィールドを表すクラス。 |
AddProcessWorkItemTypeFieldRequest
作業項目の種類にフィールドを追加する要求を記述するクラス。
名前 | 型 | 説明 |
---|---|---|
allowGroups |
boolean |
グループ ID へのフィールド値の設定を許可します。 ID フィールドにのみ適用されます。 |
allowedValues |
string[] |
フィールドで使用できる値の一覧。 |
defaultValue |
object |
フィールドの既定値。 |
readOnly |
boolean |
true の場合、フィールドは編集できません。 |
referenceName |
string |
フィールドの参照名。 |
required |
boolean |
true の場合、フィールドを空にすることはできません。 |
CustomizationType
この作業項目のカスタマイズの種類を示します。 システムの動作は親プロセスから継承されますが、変更されません。 継承された動作は、親プロセスから継承された変更された動作です。 カスタム動作は、現在のプロセスでユーザーによって作成された動作です。
値 | 説明 |
---|---|
custom |
新しく作成した workitemtype がカスタマイズされている場合、Customization-type は Custom です。 |
inherited |
継承されたプロセスの既存の workitemtype がカスタマイズされている場合、カスタマイズタイプは継承されます。 |
system |
がシステムによって生成された workitemtype の場合、カスタマイズの種類は System です。 |
FieldType
値 | 説明 |
---|---|
boolean |
ブール型のフィールド型。 |
dateTime |
DateTime フィールドの種類。 |
double |
Double フィールド型。 |
guid |
Guid フィールドの種類。 |
history |
履歴フィールドの種類。 |
html |
HTML (複数行) フィールド型。 |
identity |
ID フィールドの種類。 |
integer |
整数フィールド型。 |
picklistDouble |
二重選択リスト フィールドの種類。 |
picklistInteger |
整数の picklist フィールド型。 |
picklistString |
文字列選択リスト フィールドの種類。 |
plainText |
プレーン テキスト フィールド型。 |
string |
文字列フィールド型。 |
treePath |
Treepath フィールドの種類。 |
ProcessWorkItemTypeField
作業項目の種類とそのプロパティのフィールドを表すクラス。
名前 | 型 | 説明 |
---|---|---|
allowGroups |
boolean |
グループ ID へのフィールド値の設定を許可します。 ID フィールドにのみ適用されます。 |
allowedValues |
object[] |
フィールドで使用できる値の一覧。 |
customization |
この作業項目のカスタマイズの種類を示します。 |
|
defaultValue |
object |
フィールドの既定値。 |
description |
string |
フィールドの説明。 |
isLocked |
boolean |
編集のためにロックされているフィールド定義に関する情報 |
name |
string |
フィールドの名前。 |
readOnly |
boolean |
true の場合、フィールドは編集できません。 |
referenceName |
string |
フィールドの参照名。 |
required |
boolean |
true の場合、フィールドを空にすることはできません。 |
type |
フィールドの型。 |
|
url |
string |
フィールドのリソース URL。 |