Skip to content

Commit b9af0d5

Browse files
authored
Merge pull request #167 from makeplane/preview
feat: add options field docs in create property API
2 parents 0db88a2 + 8e1721e commit b9af0d5

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

api-reference/issue-types/properties/add-property.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,15 @@ Default value(s) for the property.
3333
<ParamField body="is_required" type="boolean">Whether this property is required when creating work items.</ParamField>
3434
<ParamField body="is_active" type="boolean">Whether this property is currently active.</ParamField>
3535
<ParamField body="is_multi" type="boolean">Whether this property allows multiple values.</ParamField>
36+
<ParamField body="options" type="object[]">
37+
Array of option objects for OPTION type properties. This field can be used while creating a property with type OPTION to set options on the custom property during creation itself. Each option object can contain:
38+
- `name` (string): Name of the option
39+
- `description` (string): Description of the option
40+
- `is_active` (boolean): Whether the option is active
41+
- `sort_order` (number): Sort order for the option
42+
- `parent` (string): Parent option ID for hierarchical options
43+
- `is_default` (boolean): Whether this is the default option
44+
- `logo_props` (object): Logo properties for the option
45+
46+
To add or update options on an OPTION property after creation, you can use the APIs from [`issue-types/options/add-dropdown-options`](/api-reference/issue-types/options/add-dropdown-options).
47+
</ParamField>

api-reference/issue-types/values/add-property-values.mdx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ The unique identifier for the work item.
2222

2323
## Body parameters
2424

25-
<ParamField body="values" type="object[]" required>
26-
<ParamField body="value" type="string" required></ParamField>
25+
<ParamField body="value" type="string | boolean | number | string[]" required>
26+
The value type depends on the property type:
27+
- TEXT/URL/EMAIL/FILE: string
28+
- DATETIME: string (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS)
29+
- DECIMAL: number (int or float)
30+
- BOOLEAN: boolean (true/false)
31+
- OPTION/RELATION (single): string (UUID)
32+
- OPTION/RELATION (multi, when is_multi=True): list of strings (UUIDs) or single string
33+
34+
For multi-value properties (is_multi=True):
35+
- Accept either a single UUID string or a list of UUID strings
36+
- Multiple records are created
37+
- Response will be a list of values
38+
39+
For single-value properties:
40+
- Only one value is allowed per work item/property combination
2741
</ParamField>

0 commit comments

Comments
 (0)