Repeating rules

The repeat rule action allows you to repeat parts of a document to display multiple results. For example, you can use a repeating rule to fill in multiple rows of tables, as well as to repeat document sections.

To use the repeat rule, you will first need to create a placeholder in your Microsoft Word template document that covers the entire content you want to repeat using a comment. For example, select an entire row of a table, or an entire section of a document.

You will then need to create other placeholders inside that placeholder to replace content as shown below.

Repeating a placeholder

The above screenshot shows a table where the entire row has been selected by comment 57, called "Epic row". Inside the "Epic row" placeholder there are four other placeholders called "Epic key", "Epic name", "Epic story points" and "Epic completed story points". These placeholders have been created by comments 53, 54, 55 and 56. We will use these placeholders to fill in the data for each epic.

Once you have made changes to your Microsoft Word template file don't forget to upload it into Intelligent Reports. Now that we have a table which we can fill out, let's set up the rules.

We want to fill the table with details for each epic. To do this you can use a repeating rule. To specify a repeating rule action, select Repeat from the drop down list as shown below and select the placeholder to repeat. If you are trying to fill in a table this should be the placeholder that covers the entire row of the table (for the above example, this would be the placeholder called Epic row), because we want the entire row of the table to be repeated.

Now use data selection component to select a list of JIRA objects (issues, projects, users, etc.). The placeholder will be repeated once for each item in the list when the report is generated. Alternatively, you can use a calculation to choose the list of JIRA objects to repeat the placeholder for. Many operators and functions are supported in calculations. You can click here to learn more about calculations.

Note that Intelligent reports allows you to specify repeating rules inside repeating rules.

Repeating an action

The above screenshot shows a rule which can be used to fill in the details for the report shown above. Here we are repeating the placeholder called "Epic row" for each item in the JQL query we have specified. We are going to use the sub rules to fill in the details for each row using Replace actions; for example we are replacing the placeholder called "Epic key" with the Key of each item (which in this example is an epic).

You can use subrules in a repeat action to fill in the data inside the placeholder that is being repeated. Each subrule is a fully fledged rule with conditions and actions, however it will only affect content within the repeated content. This allows you to replace data for each item in the list of the repeat rule.

Data selection components in rule actions and rule conditions within a repeat rule also allow you to choose the repeating item as the source of data. This lets you access the item for this iteration of the repeat rule.

You can click here for more information on how to use a repeat rule to fill in a table.

You can nest repeat rules, so you can for example have tables within repeated subsections within repeated document sections.

Still have questions? Contact our friendly support team, we are here to help!