Short description

This function returns available options of selectable fields - disabled options will be ignored.

Output

Available since






Status
Tech review

Style guide



This function returns a  with available and enabled options and child-options of selectable fields.


availableItems(%{...somefield}) #Output: Text list




Parser expressionDescription


 availableItems(%{00103})


Returns a text list with all security levels available for the project and current user.



Parameters used in this function

ParameterInput (data type)Description
%{...somefield}

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



Returns a comma-separated   of all enabled options of the specified selectable field.


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





Variant of the function where you can optionally specify a dedicated parent option. Only child options matching the specified parent will be returned.


availableItems(%{...somefield}, option) #Output: Text list



Parser expressionDescription


allAvailableItems(%{issue.cf10100}, Europe)


This function 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 hold 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.


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


This variant returns all child-options except "South" since both existing parent options were selected.



The function will return a comma-separated list of all enabled child options of a multi-level cascading select field %{...somefield}. Only child options (2nd level option) of the specified parent option will be returned.

If you want to specify multiple parent options, enter a comma-separated list to the function.

In the case of multilevel cascading fields, a comma separated list of options should be entered. Disabled options are discarded.



Returns a 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()