Operations with Specific ProjectCustomField
This resource lets you access and configure custom fields in the specific project.
Resource |
|
---|---|
Returned entity | ProjectCustomField. For the description of the entity attributes, see Supported Fields section. |
Supported methods |
Represents settings for custom fields in a particular project.
Below you can find the list of resources that let you work with this entity.
This table describes attributes of the ProjectCustomField
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 project custom field. |
field | The custom field in the project. | |
project | The project where the custom field belongs. | |
canBeEmpty | Boolean | If |
emptyFieldText | String | The text that is shown as a placeholder when the custom field has an empty value. |
ordinal | Int | The position number of this field on the list of project custom fields. |
isPublic | Boolean | If |
hasRunningJob | Boolean | If |
condition | The condition for showing the custom field. |
Change the settings of the specific custom field in the project.
Requires permissions: Update Project
POST /api/admin/projects/{projectID}/customFields/{fieldID}?{fields}
{fieldID} | The database ID of the project custom field. |
---|
Parameter | Type | Description |
---|---|---|
fields | String | A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the |
https://example.youtrack.cloud/api/admin/projects/0-0/customFields/92-4?fields=id,bundle(id,isUpdateable,name,values(archived,releaseDate,released,id,name)),canBeEmpty,emptyFieldText,field(name,aliases,id,isAutoAttached,isDisplayedInIssueList,isPublic,isUpdateable),project(id,name)
{
"emptyFieldText": "No version"
}
{
"bundle": {
"values": [
{
"releaseDate": 1548936000000,
"released": false,
"archived": false,
"name": "2019.1",
"id": "133-19",
"$type": "VersionBundleElement"
}
],
"isUpdateable": true,
"name": "Sample Project: Versions",
"id": "71-1",
"$type": "VersionBundle"
},
"field": {
"aliases": "fix for, fixed in, fix version, version",
"isAutoAttached": true,
"isDisplayedInIssueList": true,
"isUpdateable": true,
"name": "Fix versions",
"id": "58-5",
"$type": "CustomField"
},
"canBeEmpty": true,
"project": {
"name": "Sample Project",
"id": "0-0",
"$type": "Project"
},
"emptyFieldText": "No version",
"id": "92-4",
"$type": "VersionProjectCustomField"
}
Get the settings of the specific custom field in the project.
If the field is public, requires Create Issue or Read Issue permission.
If the field is private, requires Read Issue Private Fields permission.
GET /api/admin/projects/{projectID}/customFields/{fieldID}?{fields}
{fieldID} | The database ID of the project custom field. |
---|
Parameter | Type | Description |
---|---|---|
fields | String | A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the |
https://example.youtrack.cloud/api/admin/projects/0-0/customFields/92-4?fields=id,name,aliases,bundle(id,isUpdateable,name,values(archived,releaseDate,released,id,name)),canBeEmpty,emptyFieldText,field(name,id,isAutoAttached,isDisplayedInIssueList,isPublic,isUpdateable),project(id,name)
{
"bundle": {
"values": [
{
"releaseDate": 1548936000000,
"released": false,
"archived": false,
"name": "2019.1",
"id": "133-19",
"$type": "VersionBundleElement"
}
],
"isUpdateable": true,
"name": "Sample Project: Versions",
"id": "71-1",
"$type": "VersionBundle"
},
"field": {
"isAutoAttached": true,
"isDisplayedInIssueList": true,
"isUpdateable": true,
"name": "Fix versions",
"id": "58-5",
"$type": "CustomField"
},
"canBeEmpty": true,
"project": {
"name": "Sample Project",
"id": "0-0",
"$type": "Project"
},
"emptyFieldText": "Unscheduled",
"id": "92-4",
"$type": "VersionProjectCustomField"
}
Remove the specific custom field from the project.
Requires permissions: Update Project
DELETE /api/admin/projects/{projectID}/customFields/{fieldID}
{fieldID} | The database ID of the project custom field. |
---|
Parameter | Type | Description |
---|---|---|
fields | String | A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the |
https://example.youtrack.cloud/api/admin/projects/0-0/customFields/92-35