Contents
Add Custom Field
Adds new Custom Field to the project.
Role
Administrator
Project Administrator
Method
POST
URL
/api/v2/projects/:projectIdOrKey/customFields
URL parameters
| Parameter Name | Type | Description |
|---|---|---|
| projectIdOrKey | String | Project ID or Project Key |
Form parameters
Content-Type:application/x-www-form-urlencoded
| Parameter Name | Type | Description |
|---|---|---|
| typeId (Required) | Number | Type ID of Custom field 1: Text 2: Sentence 3: Number 4: Date 5: Single list 6: Multiple list 7: Checkbox 8: Radio |
| name (Required) | String | Name |
| applicableIssueTypes[] (Multiple) | Number | Type ID to enable Custom fields empty=enable for all issue types |
| description | String | Description |
| required | Boolean | True to make the Custom field required |
Added parameters (Number)
| Parameter Name | Type | Description |
|---|---|---|
| min | Number | minimum value |
| max | Number | maximum value |
| initialValue | Number | initial value |
| unit | String | unit |
Added parameters (Date)
| Parameter Name | Type | Description |
|---|---|---|
| min | String | minimum (yyyy-MM-dd) |
| max | String | maximum (yyyy-MM-dd) |
| initialValueType | Number | 1:today, 2: today + initialShift, 3:specified day |
| initialDate | String | initial (yyyy-MM-dd) |
| initialShift | Number | date differences |
Added parameters (List)
| Parameter Name | Type | Description |
|---|---|---|
| items[] (Multiple) | String | list |
| allowInput | Boolean | true to allow “Other” input form |
| allowAddItem | Boolean | true to allow add list |
Response example
Status Line / Response Header
HTTP/1.1 200 OK
Content-Type:application/json;charset=utf-8
Response Body
{
"id": 2,
"projectId": 5,
"typeId": 1,
"name": "Attribute for Bug",
"description": "",
"required": false,
"applicableIssueTypes": [1]
}