Versions Compared

Key

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


UI Text Box
sizemedium
typeinfo

This function returns the number of available options of selectable fields.

Disabled options will be ignored.


Code Block
languagebash
titleSyntax
linenumberstrue
numberOfAvailableItems(field) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
linenumberstrue
 numberOfAvailableItems(%{issue.securityLevel})


This example returns the number of all available security levels available for the project and current user, e.g.

3



Returns the
UI Expand
titleAdditional information

This function is equivalent to count(availableItems(

Page properties
hiddentrue
Short description
Status
subtletrue
titlenumber
of available options in select or multi-select field with field code

%{...somefield}) .

UI Text Box
typenote

Disabled options are discarded.

Parameters used in this function

ParamaterInput (data type)Description
field

Status
subtletrue
titletext

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



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber


UI Text Box
typetip

If you need the actual options instead of just the number try using availableItems()



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_numberofavailableitems" and space = currentSpace()


2.2.7
Page properties
hiddentrue
id1


Parser function cloud
Map(error)
NotesNot possible to access to that kind of information about selectable fields.
Available since
Status
subtletrue
colourBlue
title




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titletododone

Style guide

Status
colourGreen
titletododone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



info
Page properties
hiddentrue


Short description
UI Text Box
sizemedium
type

Returns the number of available options of selectable fields.

Output

Status
subtletrue
titlenumber

of available options in select or multi-select field with field code %{...somefield}. It's equivalent to count(availableItems(%{...somefield})) . Disabled options are discarded.
Code Block
languagebash
titleSyntax
linenumberstrue
numberOfAvailableItems(%{...somefield}) #Output: Number

This function is equivalent to count(availableItems(%{...somefield}).

Available since

Status
subtletrue
colourBlue
title2.2.7

Label
UI Expand
titleExamples
UI Expand
titleAdditional information
Note

Disabled options are discarded.

UI Expand
titleOutput
the function returns a Statussubtletruetitlenumber