Button handy |
---|
blank | true |
---|
color | #0052CC |
---|
name | Send Feedback |
---|
link | https://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=admSetCustomFieldOptionEnabledState+-+15489757 |
---|
width | auto |
---|
|
Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | admSetCustomFieldOptionEnabledState(fieldName, fieldOption, projectKeys, issueTypes, useDefaultScheme, enableOption) | Package | adm | Alias | | Pkg Usage | setCFOptionEnabledState(fieldName, fieldOption, projectKeys, issueTypes, useDefaultScheme, enableOption) |
|
Description
Excerpt |
---|
|
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 function only handles custom fields of the following types: single select, multi select, radio buttons, checkboxes and cascading selects.
...
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
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 children options, 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) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "customfield_admin_routine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|