Skip to end of banner
Go to start of banner

admGetCustomFieldOptions

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Description

Retrieves the option list of a custom field for the specified context (projects and issue types).

All parameters are required, but if the project keys and issue types arrays are empty, the global context is going to be used.

Each option will reside on a separate line. In case of cascade selects, the child options will be prefixed with a space character.

The new line separator is system dependent (where the system can be Windows, Mac or Linux. The line separator can be either '\n', '\r' or '\r\n'. This routine only handles custom fields of the following types: single select, multi select, radio buttons, checkboxes and cascading selects.

Parameters

Return Type

String

Returns a string representing the options of the specified custom field.

Examples

Example 1

Get the options of the "CF_CASCADE" custom field, using the global context.

admGetCustomFieldOptions("CF_CASCADE", {}, {});

Possible result as a string:

<ac:structured-macro ac:name="code" ac:schema-version="1"><ac:plain-text-body>Parent option 1
 Child option 1
 Child option 2
Parent option 2
 Child option 1
 Child option 2</ac:plain-text-body></ac:structured-macro>

Example 2

Get the options of the "CF_SELECT" custom field, using the context for projects "PRJ1" and "PRJ2" and issue types "Bug" and "Task".

admGetCustomFieldOptions("CF_SELECT", {"PRJ1", "PRJ2"}, {"Bug", "Task"});

Possible result as a string:

<ac:structured-macro ac:name="code" ac:schema-version="1"><ac:plain-text-body>Option 1
Option 2
Option 3</ac:plain-text-body></ac:structured-macro>

See also

  • No labels