Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

admSetCustomFieldOptionEnabledState(fieldName, fieldOption, projectKeys, issueTypes, useDefaultScheme, enableOption)

Package

adm

Alias

Pkg Usage

setCFOptionEnabledState(fieldName, fieldOption, projectKeys, issueTypes, useDefaultScheme, enableOption)

Description

Excerpt
hiddentrue

Updates the enabled/disabled state of a specific custom field option for the specified context.

Updates the enabled/disabled state of a specific custom field option for the specified context. If the context does not exist, it will be created. If the project keys and issue types are not specified (empty arrays), the global context will be used. This routine only handles custom fields of the following types: single select, multi select, radio buttons, checkboxes and cascading selects.

...

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

fieldName

String

Yes

Name of custom field.

fieldOption

string or string array

Yes

The field option that will be enabled or disabled.

To handle

For simple select fields (non-cascading), use a string to identify the option.
For cascading select

custom

fields

children options

, use a string array

, and fill

with two elements. Fill the first array position with the parent field option

,

and the second one with the child field option.

projectKeys

String []

Yes

Project keys. An empty array can be passed for this parameter.

issueTypes

String []

Yes

Issue types. An empty array can be passed for this parameter.

useDefaultScheme

Boolean (true/false)

Yes

Specify if you want to use the default configuration scheme (or context) of this custom field.

enableOption

Boolean (true/false)

Yes

Specify if you want the option to be enabled (set as true) or disabled (set as false).

Return Type

Boolean (true/false)

...

Code Block
admSetCustomFieldOptionEnabledState("CF_SINGLE_SEL", "parent", {}, {}, false, false);
Note

The disabled options are still visible on the issues where the custom field value has been set before the DISABLE operation took place. They will not show anymore on the new issues or issues that have ENABLED values set in the custom field.

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "customfield_admin_routine" and space = currentSpace ( )
labelsarray_routines