Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.cloudIdstringRequired within parentPattern: ^[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.fieldIdstringRequired within parent
bodyModelRequired within parentExpand Set custom field contexts default values — request body — body

Referenced models: Set custom field contexts default values — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$nullRoot

14 more schemas are linked from the tables above, on the schema pages.

Set custom field contexts default values — request body — body
FieldTypePresenceDescription and constraints
$objectRootDefault values to update.
Additional keys: not allowed
defaultValuesarrayOptional
defaultValues[]ModelEach itemExpand 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
FieldTypePresenceDescription and constraints
$objectRootThe default value for a cascading select custom field.
cascadingOptionIdstringOptionalThe ID of the default cascading option.
contextIdstringRequired within parentThe ID of the context.
optionIdstringRequired within parentThe ID of the default option.
typestringRequired within parentMust equal: option.cascading
Add issue types to context — request body — body default Value type datepicker
FieldTypePresenceDescription and constraints
$objectRootThe default value for a Date custom field.
contextIdstringRequired within parentThe ID of the context.
datestringOptionalThe default date in ISO format. Ignored if `useCurrent` is true.
typestringRequired within parentMust equal: datepicker
useCurrentbooleanOptionalWhether to use the current date.
Default: false
Add issue types to context — request body — body default Value type datetimepicker
FieldTypePresenceDescription and constraints
$objectRootThe default value for a date time custom field.
contextIdstringRequired within parentThe ID of the context.
dateTimestringOptionalThe default date-time in ISO format. Ignored if `useCurrent` is true.
typestringRequired within parentMust equal: datetimepicker
useCurrentbooleanOptionalWhether to use the current date.
Default: false
Add issue types to context — request body — body default Value type float
FieldTypePresenceDescription and constraints
$objectRootDefault value for a float (number) custom field.
contextIdstringRequired within parentThe ID of the context.
numbernumberRequired within parentThe default floating-point number.
Format: double
typestringRequired within parentMust equal: float
Add issue types to context — request body — body default Value type forge datetime
FieldTypePresenceDescription and constraints
$objectRootThe default value for a Forge date time custom field.
contextIdstringRequired within parentThe ID of the context.
dateTimestringOptionalThe default date-time in ISO format. Ignored if `useCurrent` is true.
typestringRequired within parentMust equal: forge.datetime
useCurrentbooleanOptionalWhether to use the current date.
Default: false
Add issue types to context — request body — body default Value type forge group
FieldTypePresenceDescription and constraints
$objectRootThe default value for a Forge group custom field.
contextIdstringRequired within parentThe ID of the context.
groupIdstringRequired within parentThe ID of the the default group.
typestringRequired within parentMust equal: forge.group
Add issue types to context — request body — body default Value type forge group list
FieldTypePresenceDescription and constraints
$objectRootThe default value for a Forge collection of groups custom field.
contextIdstringRequired within parentThe ID of the context.
groupIdsarrayRequired within parentThe IDs of the default groups.
Unique items: true
groupIds[]stringEach itemThe IDs of the default groups.
typestringRequired within parentMust equal: forge.group.list
Add issue types to context — request body — body default Value type forge string list
FieldTypePresenceDescription and constraints
$objectRootThe default text for a Forge collection of strings custom field.
contextIdstringRequired within parentThe ID of the context.
typestringRequired within parentMust equal: forge.string.list
valuesarrayOptionalList of string values. The maximum length for a value is 254 characters.
values[]stringEach itemList 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
FieldTypePresenceDescription and constraints
$objectRootDefaults for a Forge collection of users custom field.
accountIdsarrayRequired within parentThe IDs of the default users.
accountIds[]stringEach itemThe IDs of the default users.
contextIdstringRequired within parentThe ID of the context.
typestringRequired within parentMust equal: forge.user.list
Add issue types to context — request body — body default Value type forge number
FieldTypePresenceDescription and constraints
$objectRootDefault value for a Forge number custom field.
contextIdstringRequired within parentThe ID of the context.
numbernumberRequired within parentThe default floating-point number.
Format: double
typestringRequired within parentMust equal: forge.number
Add issue types to context — request body — body default Value type forge object
FieldTypePresenceDescription and constraints
$objectRootThe default value for a Forge object custom field.
contextIdstringRequired within parentThe ID of the context.
objectobjectOptionalThe default JSON object.
typestringRequired within parentMust equal: forge.object
Add issue types to context — request body — body default Value type forge string
FieldTypePresenceDescription and constraints
$objectRootThe default text for a Forge string custom field.
contextIdstringRequired within parentThe ID of the context.
textstringOptionalThe default text. The maximum length is 254 characters.
typestringRequired within parentMust equal: forge.string
Add issue types to context — request body — body default Value type forge user
FieldTypePresenceDescription and constraints
$objectRootDefaults for a Forge user custom field.
accountIdstringRequired within parentThe ID of the default user.
contextIdstringRequired within parentThe ID of the context.
typestringRequired within parentMust equal: forge.user
userFilterModelRequired within parentExpand 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
FieldTypePresenceDescription and constraints
$objectRootDefault value for a labels custom field.
contextIdstringRequired within parentThe ID of the context.
labelsarrayRequired within parentThe default labels value.
labels[]stringEach itemThe default labels value.
typestringRequired within parentMust equal: labels
Add issue types to context — request body — body default Value type longtext
FieldTypePresenceDescription and constraints
$objectRootThe default text for a plain text paragraph custom field.
contextIdstringRequired within parentThe ID of the context.
textstringOptionalThe default text. Line breaks are preserved. The maximum length is the instance's text field character limit.
typestringRequired within parentMust equal: longtext
Add issue types to context — request body — body default Value type multi user select
FieldTypePresenceDescription and constraints
$objectRootThe default value for a User Picker (multiple) custom field.
accountIdsarrayRequired within parentThe IDs of the default users.
accountIds[]stringEach itemThe IDs of the default users.
contextIdstringRequired within parentThe ID of the context.
typestringRequired within parentMust equal: multi.user.select

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]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.