You are on the Xporter Server documentation. If you are looking for Xporter Cloud documentation, you can find it in this page.

In this exercise, you'll learn how to export information from JQL Queries.

The syntax is similar to the other iterations, but there is a clause parameter that will receive the JQL Query. 

The clause is a query in JQL. For more details, check here.

The clause can be copy/pasted from the JQL of Jira advanced search for issues. If the clause JQL is valid, it will be valid in the template.

The section between #{for i=JQLIssuesCount|clause=<clause>} and #{end} will grow dynamically according to the number of existing issues respecting the clause.

In order to begin iterating the JQLissues with a clause, at the beginning of the iteration section of your template, put the mapping #{for i=JQLIssuesCount|clause=project = ACADEMY}, and at the end of that section, put the mapping #{end} to close it.

On the example clause, we used ACADEMY because the name of our project is ACADEMY. Put the name of your project.

Also, you can use a placeholders on the clause(e.g. #{for i=JQLIssuesCount|clause=project = ${ProjectKey}} )

Since you're iterating, put JQLIssues[i]. at the beginning of the mapping of the JQLIssues Field you're trying to populate. 

Using the JQLIssuesCount mapping inside your iteration will return the count of issues that you have on the clause.

With the JQLIssuesCount iteration, you can populate the fields that you have on the issue. You can find the fields here.

When using the #{for i=JQLIssuesCount|clause=project = ACADEMY} statement, use one variable name like i. If you want to use a different variable name, like a, start your iteration with the statement #{for a=JQLIssuesCount|clause=project = ACADEMY} and make sure to change it properly on the JQLIssues[a]. at the beginning of the mapping of the Issue Field you're trying to populate. 

Expand to see the sample code
 
#{for i=JQLIssuesCount|clause=project = ACADEMY }
   Key: ${JQLIssues[i].Key}
   Summary: ${JQLIssues[i].Summary}
#{end}

When defining an iteration for multiple columns of an XLSX template, you need to merge a row of columns and define the #{for i=JQLIssuesCount|clause=project = ACADEMY} inside the merged cells. The same thing should be made to define the #{end} of the same iteration. All content between the #{for i=JQLIssuesCount|clause=project = ACADEMY} definition and the #{end} will be duplicated for each issue returned by the JQL clause.

For more details, please check our documentation here.

Below is a sample of how the mappings will be displayed in an Excel template:

This Template has:

  • A static section iteration
  • Headings
  • Text styling

Below there is a sample of how the generated file will be populated:

If you like this exercise, please leave a comment or a (thumbs up). Your feedback is very important to us.

Thank you in advance.

Enjoy our product. (big grin)

Here are the files related to this Exercise:

FileDescription
Exercise3Template

Exercise 3 Sample Template file

Exercise3GeneratedExercise 3 Sample generated file
  • No labels