Versions Compared

Key

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

...

Changes to issues are registered in the Issue Activity, but it is not known in advance how many changes are going to be made. You can iterate a section over all the activities of an issueIssue. This allows you to create a table that dynamically grows according to the number of existing activities. The notation is:

...

Below are two examples of using the Activity iteration in a Word and Excel template:

word.pngImage RemovedImage Added Iterating_Activity_Entries.docx

excel.pngImage RemovedImage Added Iterating_Activity_Entries.xlsx

...

You can iterate a section over all the history entries of an issueIssue. This allows you to create a table that dynamically grows according to the number of changes done. 

...

FieldDescription
HistoryEntriesCountReturns the number of changes made.
AuthorReturns the user who made the change.
CreatedDate of the change
TestVersionIn the case of Xray Tests, it outputs the Test version where the change was made (if applicable)
ChangedItemsCoutReturns the number of fields changed in the current change.
ChangedItem
FieldDescription
FieldReturns the name of the field in which the value was changed.
FromReturns the old value.
ToReturns the new value.


The notation is:

Code Block
titleExpand to see the sample code
collapsetrue
#{for historyEntries}
   ${fullname:HistoryEntries[n].Author} made changes ${dateformat("dd-MM-yyyy HH:mm:ss"):HistoryEntries[n].Created}
  #{for ch=HistoryEntries[n].ChangedItemsCount}
	Field Name: ${HistoryEntries[n].ChangedItems[ch].Field}
	Old Value:  ${HistoryEntries[n].ChangedItems[ch].From}
	New Value:  ${HistoryEntries[n].ChangedItems[ch].To}
  #{end} 
#{end}
 
or
 
#{for h=HistoryEntriesCount}
   ${fullname:HistoryEntries[h].Author} made changes    ${dateformat("dd-MM-yyyy HH:mm:ss"):HistoryEntries[h].Created}
   #{for ch=HistoryEntries[h].ChangedItemsCount}
	Field Name: ${HistoryEntries[h].ChangedItems[ch].Field}
	Old Value:  ${HistoryEntries[h].ChangedItems[ch].From}
	New Value:  ${HistoryEntries[h].ChangedItems[ch].To}
   #{end} 
#{end}

...

Because it is not known in advance how many linked issues Issues exist for an issueIssue, you can iterate a section over all the linked issues Issues of an issueIssue. This allows you to create a table that dynamically grows according to the number of existing linked issuesIssues

Exportable Data

FieldDescription
AppType

Returns the Application Type. The values can be:

Application ValueDescription

JIRA

Link from the same Jira Instance
External Jira Link from the another Jira Instance
Confluence Link from a Confluence page
External External link
LinkType Returns the Link Type.

...

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 documents below demonstrates an demonstrate an example of a template that iterates over linked issuesIssues.

word.pngImage Removed Image Added Iterating_Issue_Links.docx

excel.pngImage Removed Image Added Iterating_Issue_Links.xlsx

...

Because it is not known in advance how many comments exist for an issueIssue, you can iterate a section over all the comments on an issueIssue. This allows you to create a table that dynamically grows according to the number of existing comments. The notation is:

...


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

word.pngImage Removed Image Added Iterating_Issue_Comments.docx

excel.pngImage Removed Image Added Iterating_Issue_Comments.xlsx

Issue Worklogs

Because it is not known in advance how many worklogs exist for an issueIssue, you can iterate a section over all the worklogs of an issueIssue. This allow allows you to create a table that dynamically grows according to the number of existing worklogs. The notation is:

...

Because it is not known in advance how many subtasks exist for an issueIssue, you can iterate a section over all the subtasks of an issueIssue. This allows you to create a table that dynamically grows according to the number of existing subtasks. The notation is:

...

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 documents below demonstrate an demonstrate an example of a template that iterates over issue Issue subtasks.

word.pngImage Removed Image Added Iterating_Issue_Subtasks.docx

excel.pngImage Removed Image Added Iterating_Issue_Subtasks.xlsx

For an example of how to iterate the details of a subtask Parent issueIssue, please check the Iterating the Iterating JQL Queries area below.

Issue Components

Because it is not known in advance how many components exist for an issueIssue, you can iterate a section over all the components of an issueIssue. This allows you to create a table that dynamically grows according to the number of existing components. The notation is:

...

 The documents below demonstrate an example of a template that iterates over issue Issue components.

word.pngImage Removed Image Added Iterating_Issue_Components.docx

excel.pngImage Removed Image Added Iterating_Issue_Components.xlsx

...

Because it is not known in advance how many Status Transitions exist for an issueIssue, you can iterate a section over all the Status Transitions of an issueIssue. This allows you to create a table that dynamically grows according to the number of existing status transitions. The notation is:

...


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

word.pngImage Removed Image Added Iterating_Issue_StatusTransitions.docx

excel.pngImage Removed Image Added Iterating_Issue_StatusTransitions.xlsx

...

Because it is not known in advance how many Images can exist for an issue Issue (as an attachment), you can iterate a section over all the attached images of an issue Issue to get some metadata about them. This allows you to create a table that dynamically grows according to the number of existing images. The notation is:

...

The image below demonstrates an example of a Word template that iterates over attached images. 

word.pngImage Removed Image Added Iterating_Issue_Images.docx


Info

Doc. Document Generator will automatically read the EXIF orientation property of an image and rotate it to its correct orientation. You can turn this off by adding this property to your template.

...

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

excel.pngImage Removed Image Added Iterating_Issue_Images.xlsx

...

Because it is not known in advance how many attachments exist in an issueIssue, you can iterate a section over all the attachments of attachments of an issueIssue. This allows you to create a table that dynamically grows according to the number of existing attachments. The notation is:

Attachments FieldsDescription
IDThe ID of the attachment
NameThe name of the attachment
AuthorThe author of the attachment
AuthorFullNameThe full name of the author of the attachment
CreatedThe date the attachment was created
SizeThe size of the attachment
HumanReadableSizeThe formatted size of the attachment
MimeTypeThe type of the attachment
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 documents below demonstrate an demonstrate an example of a template that iterates over attachments.

word.pngImage Removed Image Added Iterating_Issue_Attachments.docx

excel.pngImage Removed Image Added Iterating_Issue_Attachments.xlsx

...

Because it is not known in advance how many labels exist in an issueIssue, you can iterate a section over all the labels of an issueIssue. The notation is:

Attachments FieldsDescription
NameThe name of the label

...

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

word.pngImage Removed Image Added Iterating_Issue_Labels.docx

excel.pngImage Removed Image Added Iterating_Issue_Labels.xlsx

...

You can iterate over all project versions to which the issue belong toIssue belongs. The notation is:

Attachments FieldsDescription
NameThe name of the project version
DescriptionThe description of the project version
          Start date
        
The Start Date of the project version
          Release date
        
The Release Date of the project version
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 documents below demonstrate an demonstrate an example of a template that iterates over the project version.

word.pngImage Removed Image Added Iterating_Issue_ProjectVersions.docx

excel.pngImage Removed Image Added Iterating_Issue_ProjectVersions.xlsx

...

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 documents below demonstrate an demonstrate an example of a template that iterates over issue subtasksIssue Subtasks.

word.pngImage Removed Image Added Iterating_JQLIssues.docx

excel.pngImage Removed Image Added Iterating_JQLIssues.xlsx
 

Info

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


Applying

...

Filters to Iterations

If you want to take the previous iterations over commentsComments, Subtasks, subtasks and issue Issue links to another level of control, you can use a JavaScript filter to define over which issues the iteration will be made. This can be useful in the following scenarios:

  • Iterating over linked issues Issues that are only of a specific issue typeIssue Type.
  • Iterating over subtasks of a specific issue typeIssue Type.
  • Iterating over linked issues Issues with a specific priority.
  • Iterating over comments Comments created by a specific user.

The notation for applying filters to the iterations is:

...

  • VariableName is the name of the variable to use as the iteration index.
  • LinksCount|SubtasksCount|CommentsCount  indicates over which type of entities you want to iterate.

  • Filter indicates the filter to be applied in the iteration.

Notice that as the filter is evaluated as a JavaScript expression, which provides flexibility in the definition of the conditions. You can use and (&&), or (||) and other logical operators supported by the JavaScript language.

...

The image below demonstrates an example of a template that iterates over issue Issue links and comments with filters being applied.

Links Bugs with High Priority:

word.pngImage Removed Image Added Links_Bugs_HighPriority.docx

Nested Iterations:

word.pngImage Removed Image Added Links_Nested_Iterations.docx

...

You can use all the Iterations that you are used to and construct them in the exact same way, the difference being that you only use one cell to do them.

...

You can iterate anything, set up a Conditional expression, and then utilize the BREAK and CONTINUE statements.

...

You can iterate a section over all the parent issues of an issueIssue. This allows you to create a table that dynamically grows according to the information you want to see from parent issuesIssues.

Imagine that you have a Jira Issue that contains a Key, Summary, Description, and further information. From now on, you are able to get all the information from a parent issue. In order to To get those fields, you just need to have the following definition:

...

Code Block
titleExpand to see the sample code
collapsetrue
This iteration will be sorted by the Body of all the comments in the issue.

#{for comments|sortby=Body}
${Comments[n].Author}
${Comments[n].Body}
#{end}

Sort By on multi issue  issue export

The sortby can also be used to sort a &{for issues} iteration on a Bulk Export.

...

Info
titleSorting Criteria

asc and desc can be defined in order to define how do you want to sort your data. The default value is is asc.