Availability
This routine is available since JJUPIN 3.0.2
Syntax
lfAllowSelectOptions(field, options[, triggerChange])
Description
Restricts the list of given options of the field to the list of options given as parameter.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
field | String | Yes | The field to restrict options for. |
options | String | Yes | The list of remaining options. |
triggerChange | Boolean | No | If set to true, triggers the change event on the field when routine is used. |
Example
The following code example restricts anything but Major and Minor from the options of the priority standard field.
lfAllowSelectOptions("priority", {"Major", "Minor"}); //where field = "priority" and options = "Major" and "Minor"
If you want to trigger the change event on the field when using lfAllowSelectOptions, you can use the optional triggerChange parameter set to true:
lfAllowSelectOptions("customfield_10000", {"option1", "option2"}, true); //where field = "customfield_10000" of type select list, options = "option1" and "option2" and triggerChange = true
See Also:
-
Workaround to use live fields in Jira work log screen using Power Scripts (One Appfire Support Knowledge Base)