availableItems()

Field

This function returns a text list with available and enabled 1st-level options of selectable fields.

Disabled options will be ignored.

Bash
availableItems(field) #Output: Text list

Examples

Parser expression

Description

 availableItems(%{issue.securityLevel})

This example returns a text list with all security levels available for the project and current user.

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

field

text

The parameter must be a valid field code for a selectable field.

Output

This function returns a comma-separated  text list  of all enabled options of the specified selectable field.

Field with parent option

Variant of the function where you can optionally specify a dedicated parent option.

Only child options matching the specified parent will be returned.

Bash
availableItems(field, parentOption) #Output: Text list

Examples

Parser expression

Description

availableItems(%{issue.cf10100}, "Europe")

This example returns all child options of the Europe option in a custom cascading select field with the field code issue.cf10100.

Let's assume the custom field holds regions and is structured in the following way:

  • Europe

    • North

    • South (disabled)

    • East

    • West

  • US

    • Alabama

    • Alaska

    • ...

In this example the function would return "North, East, West".

Disabled options will be ignored.

Additional information

This function will return a comma-separated list of all child options of a cascading select fieldOnly child options (2nd level option) of the specified parent option will be returned.

Parameters used in this function

Parameter

Input (data type)

Description

field

text

The parameter must be a valid field code for a selectable field.

parentOption

text

The parameter must be a valid option name.

Output

This function returns a text list with all available child options of a specified cascading select field.

Only enabled options will be returned. If you want to include disabled options, please use the related function: allAvailableItems()

📚 Use cases and examples

Use case JWT feature Workflow function Field type Automated action Parser functions