Versions Compared

Key

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

This routine is available starting with Power Scripts™ v3.0.2 (server) and above.

...

titleSupported Custom Fields

...

The use of this routine requires the Power Scripts for Jira add-on be installed and licensed.

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

lfAllowSelectOptions(field, options[, triggerChange])

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue
Restricts a field's selectable values to the list of options given as a parameter of the routine.

Restricts a field's selectable values to the list of options given as a parameter of the routine.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

field

string

Yes

Field to restrict options for

options

string[]

Yes

List of remaining options

triggerChange

Boolean

No

If set to "true", it triggers the change event on the field when a routine is used

Return Type

None

Example

...

Code Block
lfAllowSelectOptions("priority", {"Medium", "High"}); 
//where field = "priority" and options = "Medium" and "High"

...

If you want to trigger the change event on the field when using the lfAllowSelectOptions routine, you can use the optional triggerChange parameter set to true:

Code Block
lfAllowSelectOptions("customfield_10000", {"option1", "option2"}, true); 
//where field = "customfield_10000" of type select list, options = "option1" and "option2" and triggerChange = true

...

Filter by label (Content by label)
showLabelsfalse
max3525
showSpacefalse
sorttitle
cqllabel = "lf_routine" and space = currentSpace ( )
labelsjiraarray_comment_routineroutines