Plugin custom field not exporting to CSV

I have a jira plugin we’ve created for in-house use that will add a multi-cascade drodpown that can be several levels deep to a jira issue. The plugin is working with no problems in JIRA itself. However, when we try to export issues to a csv file, the csv has the column with the field name but no data shows up. The data will show up in any other export type (HTML, RSS, etc…)

The field in question is called TestCascade in the search.

I strongly suspect that the issue is that because it has multiple values, something in JIRA is unable to process it when it exports to csv because it’s all supposed to be on one line. I was hoping it would export like a normal cascade field would.

The jira plugin field was created with extending the com.atlassian.jira.issue.customfields.impl.CascadingSelectCFType and the com.atlassian.jira.issue.fields.config.FieldConfigItemType classes. I’ve search through them and their super classes but don’t see a method or property that lets me output the field during an export. I’m using this with Jira 8.20.1.

Because I couldn’t put a 2nd screenshot in the above post. Here’s the csv output showing that while there’s a column for TestCascade, none of the values were populated

Well if anyone ever sees the problem, the solution is to write your own ExportableCustomFieldType.getRepresentationFromIssue() interface method which is implemented in the CascadingSelectCFType class. You can get a Hashmap of the fields with getValueFromIssue(), and combine them into a string to be sent back as a FieldExportParts object via FieldExportPartsBuilder.buildSinglePartRepresentation().