Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Xporter not working with conditionals in iteration, even with Javascript


I have a custom Checkboxes field and I would like to create a report with all possible values listed alongside a checkbox indicating whether the value is included.

For example, assume the `ImpactCategory` custom field has the possible values ["Safety", "Cybersecurity", "Patient Satifaction"]. If my issue included just Safety and Cybersecurity, I would like to output:

☒ Yes ☐ No
☒ Yes ☐ No
Patient Satifaction:
☐ Yes ☒ No

I have tried several approaches here and nothing has worked so far.

When I use this format, the report includes a comma-separated list of the checked values in the field.


However, when I try to iterate through the custom field, it fails. For example, nothing is printed when I use this syntax:

#{for ImpactCategory}

I have been able to use Javascript with the following syntax to split the comma-separated string into an array and then iterate through the array. However, it only prints the last item:

%{ var output; var c = '${ImpactCategory[10183]}'.split(','); for (var i = 0; i < c.length; i++) { c[i] }}

When I attempt to use conditional logic in the Javascript, it prints nothing. For example:

%{ var output; var c = '${ImpactCategory[10183]}'.split(','); for (var i = 0; i < c.length; i++) { if (c[i]) === "Cybersecurity" { output = c[i] } else { output = "No" }} output; }

I noticed a similar question here: However, even though the most recent comment says this is resolved, the solution does not work.

Is there any way to achieve this functionality?

Thanks in advance for your help!

1 answer

Hi @Adam Price 

Concerning the concrete situation you're facing, you'll need to provide more data so I recommend you reach out Xray support and the support team will be glad to help you out.

Best Regards,



Solution Architect and Testing Advocate @Xray

Personal blog on testing, Agile, and software development:

Follow me on Twitter:

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events