Info |
---|
|
This routine is available starting with SIL Engineā¢ 4.0.4. |
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 | admAddCustomFieldOption(option, fieldName[, projectKey, issueType]) | Package | | Alias | | Pkg Usage | | |
Description
Excerpt |
---|
|
Adds a new custom field option to options list for the specified context. If the context does not exist, it will be created. |
If the project key and issue type are not specified, the option will be added to the global context.
Adds a new custom field option to options list for the specified context. If the context does not exist, it will be created. This routine only handles custom fields of the following types: single select, multi select, radio buttons and checkboxes (otherwise throws an exception).
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
option | |
...
String | Yes | Option to add. | fieldName |
|
...
String | Yes | Name of custom field. | projectKey |
|
...
String | No | Project key. | issueType |
|
...
Return
...
Type
boolean Boolean (true/false)
Returns 'true' if the option was added successfully and 'false' otherwise. If returned 'false' check the log for a detailed reason on why it failed.
...
Examples
Example 1
Code Block |
---|
admAddCustomFieldOption("New Option", "Select List");
|
Add the "New Option" to the global context of custom field "Select List".
Example 2
Code Block |
---|
admAddCustomFieldOption("New Option", "Select List", "TEST", "Bug"); |
Add the "New Option" to custom field "Select List" with context for project "TEST" and issue type "Bug".
Note |
---|
If already exists a context for the specified project, but not for the specified issue type, the context will not be created. |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "jiracustomfield_fieldadmin_routine" and space = currentSpace ( ) |
---|
labels | jiraarray_attachment_routineroutines |
---|
|