Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleExpand to see the sample code
collapsetrue
#{for links}
   ${Links[n].AppType}
   ${Links[n].LinkType}
   ${Links[n].Key}
   ${Links[n].Summary}
   ${Links[n].URL}
#{end}
 
or
 
#{for <VariableName>=LinksCount}
   Content and Linked Issue Mappings. Example: ${Links[VariableName].Field}
#{end}


The image The documents below demonstrates an demonstrates an example of a Word template that iterates over linked issues.

...

Code Block
titleExpand to see the sample code
collapsetrue
#{for comments}
   ${Comments[n].Author} 
   ${Comments[n].AuthorFullName} 
   ${Comments[n].Body} 
   ${dateformat("dd-MM-yyyy HH:mm:ss"):Comments[n].Created}
   ${Comments[n].GroupLevel}
#{end}
 
or
 
#{for <VariableName>=CommentsCount}
   Content and Issue Mappings. Example: ${Comments[VariableName].Field}
#{end}


The image The documents below demonstrates demonstrate an example of a Word template that iterates over issue comments.

word.png Iterating_Issue_Comments.docx

excel.png Iterating_Issue_Comments.xlsx

Issue Worklogs

...

Code Block
titleExpand to see the sample code
collapsetrue
#{for subtasks}
   ${Subtasks[n].Key}
   ${Subtasks[n].Summary}
   ${Subtasks[n].AssigneeUserDisplayName}
#{end}
 
or
 
#{for <VariableName>=SubtasksCount}
   Content and Issue Mappings. Example: ${Subtasks[VariableName].Field}
#{end}

The image The documents below demonstrates an demonstrate an example of a Word template that iterates over issue subtasks.

...

Code Block
titleExpand to see the sample code
collapsetrue
#{for components}
   ${Components[n].Name}
   ${Components[n].Description}
   ${fullname:Components[n].Lead}
   ${Components[n].Id}
   ${Components[n].ProjectId}
   ${Components[n].AssigneeType}
#{end}

 The image  The documents below demonstrates demonstrate an example of a Word template that iterates over issue components.

...

Code Block
titleExpand to see the sample code
collapsetrue
#{for statusTransitions}
   ${StatusTransitions[n].Author}
   ${dateformat("dd-MM-yyyy HH:mm:ss"):StatusTransitions[n].Created}
   ${StatusTransitions[n].OldStatus}
   ${StatusTransitions[n].NewStatus}
#{end}
 
or
 
#{for <VariableName>=StatusTransitionsCount}
   Content and StatusTransitions Mappings. Example: ${StatusTransitions[VariableName].Field}
#{end}

The image The documents below demonstrates demonstrate an example of a Word template that iterates over status transitions.

word.png Iterating_Issue_StatusTransitions.docx

excel.png Iterating_Issue_StatusTransitions.xlsx

...

Info

Note that, if you use both maxWidth and width mappings, only the max value will be read. The same behavior happens with height and maxHeight.


The image The documents below demonstrates an demonstrate an example of an Excel template that iterates over attached images. 

...

Code Block
titleExpand to see the sample code
collapsetrue
#{for attachments}
   ${Attachments[n].ID}
   ${Attachments[n].Name}
   ${Attachments[n].Author}
   ${Attachments[n].AuthorFullName}
   ${dateformat("dd-MM-yyyy HH:mm:ss"):Attachments[n].Created}
   ${Attachments[n].Size}
   ${Attachments[n].HumanReadableSize}
   ${Attachments[n].MimeType}
#{end}
 
or
 
#{for <VariableName>=AttachmentsCount}
   Content and Issue Mappings. Example: ${Attachments[VariableName].Field}
#{end}

The image The documents below demonstrates an demonstrate an example of a Word template that iterates over attachments.

word.png Iterating_Issue_Attachments.docx

...

Code Block
#{for labels}
   ${Labels[n].Name}
#{end}
 
or
 
#{for <VariableName>=LabelsCount}
  ${Labels[VariableName].Name}
#{end}

The image The documents below demonstrates an demonstrate an example of a Word template that iterates over labels.

...

Code Block
#{for projectVersions}
   ${ProjectVersions[n].Name}
   ${ProjectVersions[n].Description}
   ${dateformat("dd-MM-yyyy"):ProjectVersions[n].Start date}
   ${dateformat("dd-MM-yyyy"):ProjectVersions[n].Release date}
#{end}
 
or
 
#{for <VariableName>=ProjectVersionsCount}
   ${ProjectVersions[VariableName].Name}
   ${ProjectVersions[VariableName].Description}
   ${dateformat("dd-MM-yyyy"):ProjectVersions[VariableName].Start date}
   ${dateformat("dd-MM-yyyy"):ProjectVersions[VariableName].Release date}
#{end}

The image The documents below demonstrates an demonstrate an example of a Word template that iterates over project version.

word.png Iterating_Issue_ProjectVersions.docx

The image below demonstrates an example of an Excel template that iterates over project version.

Image Removed

or

Image Removed

excel.pngImage Added Iterating_Issue_ProjectVersions.xlsx

Iterating JQL Queries

You can iterate issues that are the result of a JQL Query. The syntax is similar to the other iterations, but there is a clause parameter that will receive the JQL Query. A few examples are provided below.

Code Block
titleExpand to see the sample code
collapsetrue
a simple example iterating the details of issues from a specified Project:
 
#{for i=JQLIssuesCount|clause=project = DEMO}
   ${JQLIssues[i].Key}
   ${JQLIssues[i].Summary} 
#{end}

or a more advanced example iterating the details of issues linked with the current Issue:
 
#{for m=JQLIssuesCount|clause=issuekey in linkedIssues (${Links[j].Key})}
   Linked Issue ${JQLIssues[m].Summary} has ${JQLIssues[m].LinksCount} links
#{end} 
 
or an also advanced example iterating the details of the Parent issue from the current Subtask:
 
#{for i=JQLIssuesCount|clause=issuekey = ${ParentIssueKey}}
	${JQLIssues[i].Key}
	${JQLIssues[i].Id}
	${JQLIssues[i].Description}
#{end}

The image The documents below demonstrates an demonstrate an example of a Word template that iterates over issue subtasks.

Image Removed

The image below demonstrates an example of an Excel template that iterates over issue subtasks.

excel.pngImage Added Iterating_JQLIssues.xlsxImage Removed 
 

Info

You can also use a Filter Name or a Filter Id as a clause. For more info, read this.

...

Links Bugs with High Priority:Image Removed

word.pngImage Added Links_Bugs_HighPriority.docx

Nested Iterations:Image Removed

word.pngImage Added Links_Nested_Iterations.docx

Iterating in the same line of the document

...