Choice Option Fields
Choice fields can be accessed using the getChoiceList(<index>) method.
This method uses collections, therefore values are retrieved by querying collection items. For single choice fields, items with an idex of 0 must be retrieved.
For example, getting the value of a choice field with a property name of choiceList[1] would be:
${items.getChoiceList(1).get(0).getName()}
You can also access fields by their label using the following expression:
${fields.getByLabel(items,"<field label>").get(0).name}
The following image is an example of a standard bugs tracker with the added fields:
The template file contains two sheets. One for accessing the fields by property names, and a second one for getting the fields by labels. An example template is available for exporting user added fields; the template file contains one sheet for accessing the fields by property names, and one for accessing the fields by labels.
Was this helpful?