Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleAvailability

This routine is available since starting with katl-commons 4.0.4.

Syntax

...

admAddCustomFieldOption(option, fieldName[, projectKey, issueType])

Description

...

Excerpt

Add 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.
This routine only handles custom fields of the following types: single select, multi select, radio buttons and checkboxes (otherwise throws an exception).


Parameters

...

Parameter name

Type

Required

Description

option

string

Yes

The option to add

fieldNamestringYesThe name of the custom field
projectKeystringNoThe project key
issueTypestringNoThe issue type

Return type

...

boolean (true/false)

Returns true if the option was added successfully, false otherwise. If returned false check the log for a detailed reason on why it failed.

Example

...

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");

...

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)
showLabelsfalse
showSpacefalse
cqllabel = "jira_field_routine"
labelsjira_attachment_routine

...