You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Since version 4.0.9 the addon defines a REST call which provides information about options


GET <jira-base>/rest/multi-level-cascading-select/1/option/getOptions


Query parameters:

fieldName (optional)
    name of the custom field (retrieve only fields with such name). If this parameter is not specified, options from fields with any name will be retrieved

projectKey (optional)
    the key of a project (retrieve only fields associated with such project). If this parameter is not specified, options from fields will be retrieved, regardless of the projects those fields are associeted with

anyType (optional, defaults to "false")
    if this is set to true, the method will retrieve not just the options of MultiLevelCascadeSelect fields but of any kind of field which uses options (ie, classes implementing the Option interface). This is known to be well-behaved on Jira Cascade Select fields, but of course there could be no guarantee on all other possible fields which make use of Option implementations

fieldConfigId (optional)
    relevant config id. This parameter is optional, but when it is specified, parameters 'fieldName' and 'projectKey'must not be used (parameters are essentially filters for fieldConfigs, so if the ID of a fieldConfig is specified, it makes no sense to use other filters, as ID is unique). If 'anyType=true' is used, then the method will try to get information about options even if the field is not of type MultiLevelCascadeSelect (see 'anyType').


Response:

The options will be described by a json structure, containing the fields


optionId - number, the (JIRA-wise) unique id number of the option

value - string, the value of the option

sequence - number, the place that the option occupies among its silblings

disabled - boolean, it is true if the option is disabled

fildConfigId - number, the ID of the field config to which the option belongs

children - array of option objects, the child-options of the option


Example:

{
    "optionId": 10504,
    "value": "Europe",
"sequence": 0,
"disabled": false,
"fieldConfigId": 10108,
"children": [
    {
        "optionId": 10505,
        "value": "Italy",
        "sequence": 0,
        "disabled": false,
        "fieldConfigId": 10108
    },
    {
        "optionId": 10506,
        "value": "France",
        "sequence": 1,
        "disabled": false,
        "fieldConfigId": 10108
    }
]
}
  • No labels