Briefly describe (1-2 sentences) the Bug you’re experiencing:
When creating a custom field via the API, either as a global custom field or as a project-local field through the custom_field_settings
endpoint, the format
field is ignored and leaves number
custom fields as unformatted (i.e. format: "none"
)
Additionally, updating the custom field format via PUT
request also ignores the format
field.
See Updated Custom Fields - #17 by Kothar for addition information.
Steps to reproduce:
- Post a new custom field for a workspace:
POST /custom_fields
{
"data": {
"custom_label": "gold pieces",
"custom_label_position": "suffix",
"format": "custom",
"name": "TEST FIELD",
"precision": 2,
"resource_subtype": "number",
"workspace": "123123"
}
}
Response
{
"data": {
"gid": "1202864787690507",
"resource_type": "custom_field",
"resource_subtype": "number",
"type": "number",
"name": "TEST FIELD",
"description": "",
"is_global_to_workspace": true,
"precision": 2,
"created_by": {
"gid": "555555",
"resource_type": "user",
"name": "Michael Houston"
}
}
}
- Query back the custom field to verify format
GET /custom_fields/1202864787690507?opt_fields=format,resource_subtype,precision,currency_code,name,custom_label,custom_label_position
Response
{
"data": {
"gid": "1202864787690507",
"name": "TEST FIELD",
"precision": 2,
"format": "none",
"currency_code": null,
"custom_label": null,
"custom_label_position": null,
"resource_subtype": "number"
}
}
Format has not been stored
- Attempt to update the custom field format
PUT /custom_fields/1202864787690507
{
"data": {
"format": "currency",
"currency_code": "USD"
}
}
Response
{
"data": {
"gid": "1202864787690507",
"resource_type": "custom_field",
"resource_subtype": "number",
"type": "number",
"name": "TEST FIELD",
"description": "",
"is_global_to_workspace": true,
"precision": 2,
"created_by": {
"gid": "555555",
"resource_type": "user",
"name": "Michael Houston"
}
}
}
- Query back the custom field to verify format (no change, same as step 2)
Format has not been stored
Browser version: Postman
Upload screenshots below: N/A