---
title: "Static Sections for Bulk Export"
canonical: "https://docs.getxray.app/space/XRAYCLOUD/44570590/Static%20Sections%20for%20Bulk%20Export"
format: markdown
---
<details>
<summary>Table of Contents</summary>

> Macro (toc)
</details>

# Exporting Multiple Issues with Static Sections

You may want to export multiple Issues, without reproducing some sections of the Template. For instance, you may want to create a cover section or some information to be added at the end of the document.

The [Document Generator](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565169) allows you to define which sections of the Template will be rendered for each Issue, and which sections will be static.

The notation is demonstrated in the example below:

##### **Sample Code**

```
This is the header of the Bulk Export, this section will be rendered once.
 
&{for issues}
This section will be repeated for every issue.
Issue Key: ${Key}
Issue Summary: ${Summary}
&{end}
 
This is the footer of the Bulk Export, this section will be rendered once.  
```

Figure 1 demonstrates a Word Template to bulk export multiple Issues:

![Figure 1 - Word template](media://7f8e0ad6-d765-4687-8af7-3d0de87d99ac)

Figure 2 demonstrates an Excel Template to bulk export multiple Issues:

![Figure 2 - Excel template](media://2b544a7e-0e5f-4223-876c-cb6209496df8)

## Static Sections with Filters

You can push the static sections functionality to another level of control by applying filters to the iterations. This can be useful if you want to export multiple Issues and place the Issues of a specific Issue Type (e.g., Bug) in one section of the Template and the Issues of another type (e.g., Story) in another.

The notation is demonstrated in the example below:

##### **Sample Code**

```
This is the header of the Bulk Export, this section will be rendered once.
 
The following section will list the issues of the type Bug.
 
&{for issues|filter=%{'${IssueTypeName}'.equals('Bug')}}
Issue Key: ${Key}
Issue Summary: ${Summary}
&{end}
 
The following section will list the issues of the type Story.
 
&{for issues|filter=%{'${IssueTypeName}'.equals('Story')}}
Issue Key: ${Key}
Issue Summary: ${Summary}
&{end}
 
This is the footer of the Bulk Export, this section will be rendered once.   
```

Figure 3 below demonstrates a Word Template for bulk export with static sections and filters applied to the iteration of Issues.

![Figure 3 - Word template](media://8504d255-2c1d-4782-b5a2-984dc71c405e)

or

![Figure 4 - Word template](media://eca07076-8af3-4d0c-a336-4d3224557e94)


Figure 5 demonstrates an Excel Template for bulk export with static sections and filters applied to the iteration of Issues.

![Figure 5 - Excel template](media://1fc45d29-6393-4db0-8309-f28119d28f7a)


or

![Figure 6 - Excel template](media://911ee98f-52ce-43be-83b7-b6455c28e421)

## Static Sections with Aggregator Iterations

The Document Generator can aggregate each Issue in a Bulk Export to its respective aggregator value.

An Aggregator Iteration is, as its name indicates, an iteration that allows you to export each Issue belonging to each aggregator value.

> ℹ️ There's only one type of aggregator iteration available: Bulk Fix Versions. We are planning the release more Types of aggregators in the near future.
> ℹ️ 
> ℹ️ This feature is also available in Excel Templates.

##### **Sample Code**

```
This is the header of the Bulk Export; this section will be rendered once.
 
The following section will list each version present on a bulk export and its respective issues.
 
&{for bulkFixVersions}
Version: ${BulkFixVersion}
&{for issues}
Issue Key: ${Key}
Issue Summary: ${Summary}
&{end}
&{end}

 
This is the footer of the Bulk Export, this section will be rendered once.   
```

Figure 7 demonstrates a Word Template that applies the logic in the code sample above:

![Figure 7 - Word template](media://79907e10-aba1-4fbb-9eb5-a42eba857910)


The result is as follows (Figure 8):

![Figure 8 - Result](media://9adcd28d-53ad-477f-b953-8715bca3724d)


<details>
<summary>Support/Troubleshooting</summary>

If you have questions or technical issues, please [contact the Support team via the Customer Portal (Jira service management)](https://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal%2F2%2Fcreate%2F28) or [send us a message using the in-app chat](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44577312).
</details>