Atlassian: Set custom field contexts default values
Atlassian issueCustomFieldContexts.setDefaultValues: arguments, response, policy and SDK examples.
← Issue custom field contexts operations · Get started
Operation atlassian.setdefaultvalues
Provider route: PUT /{cloudId}/rest/api/3/field/{fieldId}/context/defaultValue. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/atlassian with npm, or alter-sdk-atlassian with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { AtlassianIntegration } from "@alter-ai/atlassian";
async function execute(input: Parameters<AtlassianIntegration["issueCustomFieldContexts"]["setDefaultValues"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new AtlassianIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.issueCustomFieldContexts.setDefaultValues(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_atlassian import AtlassianIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = AtlassianIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.issue_custom_field_contexts.set_default_values(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.cloudId | string | Required within parent | Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
path.fieldId | string | Required within parent | |
body | Model | Required within parent | Expand Set custom field contexts default values — request body — body |
Referenced models: Set custom field contexts default values — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | null | Root |
Schemas
Section titled “Schemas”14 more schemas are linked from the tables above, on the schema pages.
Set custom field contexts default values — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Default values to update. Additional keys: not allowed |
defaultValues | array | Optional | |
defaultValues[] | Model | Each item | Expand Add issue types to context — request body — body default Value |
Referenced models: Add issue types to context — request body — body default Value
Add issue types to context — request body — body default Value type option cascading
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default value for a cascading select custom field. |
cascadingOptionId | string | Optional | The ID of the default cascading option. |
contextId | string | Required within parent | The ID of the context. |
optionId | string | Required within parent | The ID of the default option. |
type | string | Required within parent | Must equal: option.cascading |
Add issue types to context — request body — body default Value type datepicker
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default value for a Date custom field. |
contextId | string | Required within parent | The ID of the context. |
date | string | Optional | The default date in ISO format. Ignored if `useCurrent` is true. |
type | string | Required within parent | Must equal: datepicker |
useCurrent | boolean | Optional | Whether to use the current date. Default: false |
Add issue types to context — request body — body default Value type datetimepicker
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default value for a date time custom field. |
contextId | string | Required within parent | The ID of the context. |
dateTime | string | Optional | The default date-time in ISO format. Ignored if `useCurrent` is true. |
type | string | Required within parent | Must equal: datetimepicker |
useCurrent | boolean | Optional | Whether to use the current date. Default: false |
Add issue types to context — request body — body default Value type float
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Default value for a float (number) custom field. |
contextId | string | Required within parent | The ID of the context. |
number | number | Required within parent | The default floating-point number. Format: double |
type | string | Required within parent | Must equal: float |
Add issue types to context — request body — body default Value type forge datetime
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default value for a Forge date time custom field. |
contextId | string | Required within parent | The ID of the context. |
dateTime | string | Optional | The default date-time in ISO format. Ignored if `useCurrent` is true. |
type | string | Required within parent | Must equal: forge.datetime |
useCurrent | boolean | Optional | Whether to use the current date. Default: false |
Add issue types to context — request body — body default Value type forge group
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default value for a Forge group custom field. |
contextId | string | Required within parent | The ID of the context. |
groupId | string | Required within parent | The ID of the the default group. |
type | string | Required within parent | Must equal: forge.group |
Add issue types to context — request body — body default Value type forge group list
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default value for a Forge collection of groups custom field. |
contextId | string | Required within parent | The ID of the context. |
groupIds | array | Required within parent | The IDs of the default groups. Unique items: true |
groupIds[] | string | Each item | The IDs of the default groups. |
type | string | Required within parent | Must equal: forge.group.list |
Add issue types to context — request body — body default Value type forge string list
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default text for a Forge collection of strings custom field. |
contextId | string | Required within parent | The ID of the context. |
type | string | Required within parent | Must equal: forge.string.list |
values | array | Optional | List of string values. The maximum length for a value is 254 characters. |
values[] | string | Each item | List of string values. The maximum length for a value is 254 characters. |
Add issue types to context — request body — body default Value type forge user list
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defaults for a Forge collection of users custom field. |
accountIds | array | Required within parent | The IDs of the default users. |
accountIds[] | string | Each item | The IDs of the default users. |
contextId | string | Required within parent | The ID of the context. |
type | string | Required within parent | Must equal: forge.user.list |
Add issue types to context — request body — body default Value type forge number
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Default value for a Forge number custom field. |
contextId | string | Required within parent | The ID of the context. |
number | number | Required within parent | The default floating-point number. Format: double |
type | string | Required within parent | Must equal: forge.number |
Add issue types to context — request body — body default Value type forge object
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default value for a Forge object custom field. |
contextId | string | Required within parent | The ID of the context. |
object | object | Optional | The default JSON object. |
type | string | Required within parent | Must equal: forge.object |
Add issue types to context — request body — body default Value type forge string
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default text for a Forge string custom field. |
contextId | string | Required within parent | The ID of the context. |
text | string | Optional | The default text. The maximum length is 254 characters. |
type | string | Required within parent | Must equal: forge.string |
Add issue types to context — request body — body default Value type forge user
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defaults for a Forge user custom field. |
accountId | string | Required within parent | The ID of the default user. |
contextId | string | Required within parent | The ID of the context. |
type | string | Required within parent | Must equal: forge.user |
userFilter | Model | Required within parent | Expand Add issue types to context — request body — body default Value type forge user user Filter |
Referenced models: Add issue types to context — request body — body default Value type forge user user Filter
Add issue types to context — request body — body default Value type labels
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Default value for a labels custom field. |
contextId | string | Required within parent | The ID of the context. |
labels | array | Required within parent | The default labels value. |
labels[] | string | Each item | The default labels value. |
type | string | Required within parent | Must equal: labels |
Add issue types to context — request body — body default Value type longtext
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default text for a plain text paragraph custom field. |
contextId | string | Required within parent | The ID of the context. |
text | string | Optional | The default text. Line breaks are preserved. The maximum length is the instance's text field character limit. |
type | string | Required within parent | Must equal: longtext |
Add issue types to context — request body — body default Value type multi user select
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The default value for a User Picker (multiple) custom field. |
accountIds | array | Required within parent | The IDs of the default users. |
accountIds[] | string | Each item | The IDs of the default users. |
contextId | string | Required within parent | The ID of the context. |
type | string | Required within parent | Must equal: multi.user.select |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: atlassian.setdefaultvalues. Catalog operation: setdefaultvalues. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["manage:jira-configuration"]
No-content response statuses: [204]