Page History
Table of Contents
Iterating Issue
...
Comments
Because 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 comments exist for an issue, you can iterate a section over all the activities of comments on an issue. This allows you to create a table that dynamically grows according to the number of existing activitiescomments. The notation is:
Activity Comments Fields | Description | Title||
---|---|---|---|
Author | The | ||
author of the | |||
comment | |||
SummaryAuthorFullName | Author | The summary of the activity | |
Content | When an activity involves a change in the Issue contents, this field displays the new contents | ||
The full name of the author of the activitycomment | |||
AuthorEmailBody | The email of the author of the activitycomment | ||
CreatedPublished | The time date the issue comment was publishedposted | ||
UpdatedGroupLevel | The time the issue was updated | Categories | When an activity regards an Issue Status change, this field displays the new Issue Statusgroup level of the comment |
Code Block | ||||
---|---|---|---|---|
| ||||
#{for activityEntriescomments} ${ActivityEntriesComments[n].TitleAuthor} ${ActivityEntries[n].Summary} ${ActivityEntriesComments[n].ContentAuthorFullName} ${ActivityEntriesComments[n].AuthorBody} ${ActivityEntries[n].AuthorEmail} ${dateformat("dd-MM-yyyy HH:mm:ss"):ActivityEntriesComments[n].PublishedCreated} ${dateformat("dd-MM-yyyy HH:mm:ss"):ActivityEntriesComments[n].UpdatedGroupLevel} ${ActivityEntries[n].Categories} #{#{end} or #{for <VariableName>=ActivityEntriesCountCommentsCount} Content and Issue Mappings. Example: ${ActivityEntriesComments[VariableName].Field} #{end} |
Info |
---|
We suggest that you use the html function to render the data because almost all content is HTML, e.g., ${html:ActivityEntries[n].Title} |
Below is an example of using the Activity iteration in a Word template:
or
Below is an example of using the Activity iteration in an Excel template:
or
Iterating Issue Comments
The documents below demonstrate examples both in Word and Excel template that iterates over all the issue comments.
...
Iterating Issue Worklogs
Because it is not known in advance how many work logs Because it is not known in advance how many comments exist for an issue, you can iterate a section over all the comments on work logs of an issue. This allows you to create a table that dynamically grows according to the number of existing commentsworklogs. The notation is:
Worklogs Fields | Description | ||
---|---|---|---|
Author | The author of the | ||
worklog | |||
AuthorFullName | The full name of the author of the | commentworklog | |
Comment | The comment of the worklog | ||
Created | The date the | comment worklog was | postedcreated |
GroupLevel Date Started | The group level of the commentdate the worklog was started | ||
Time Spent | The time spent in seconds | ||
TimeSpentFormatted | The time spent as displayed on Jira |
Code Block | ||||
---|---|---|---|---|
| ||||
Code Block | ||||
| ||||
#{for commentsworklogs} ${CommentsWorklogs[n].Author} ${CommentsWorklogs[n].AuthorFullName} ${CommentsWorklogs[n].Body} Comment} ${dateformat("dd-MM-yyyy HH:mm:ss"):Worklogs[n].Created} ${dateformat("dd-MM-yyyy HH:mm:ss"):CommentsWorklogs[n].Date Started} ${Worklogs[n].CreatedTime Spent} ${CommentsWorklogs[n].GroupLevelTimeSpentFormatted} #{end} or #{for <VariableName>=CommentsCountWorklogsCount} Content and IssueWorklog Mappings. Example: ${CommentsWorklogs[VariableName].Field} #{end} |
...
The documents below demonstrate examples both in Word and Excel template that iterates over all the issue
...
worklogs.
or
The image below demonstrates an example of an Excel template that iterates over issue comments.
or
...
Iterating Issue Components
...
Because it is not known in advance how many work logs components exist for an issue, you can iterate a section over all the work logs components of an issue. This allows you to create a table that dynamically grows according to the number of existing worklogscomponents. The notation is:
Worklogs Components Fields | Description |
---|---|
AuthorName | The author name of the worklogcomponent |
AuthorFullNameDescription | The full name description of the author component |
Lead | The name of the worklogcomponent lead |
CommentId | The comment ID of the worklogcomponent |
CreatedProjectId | The date the worklog was created |
Date Started | The date the worklog was started |
Time Spent | The time spent in seconds |
TimeSpentFormatted | The time spent as displayed on Jira |
BillableSeconds | The billable seconds (Belongs to Tempo Timesheets plugin) |
project ID of the component | |
AssigneeType | The assignee type of the component |
Code Block | ||||
---|---|---|---|---|
| ||||
#{for worklogscomponents} ${WorklogsComponents[n].AuthorName} ${WorklogsComponents[n].AuthorFullNameDescription} ${Worklogsfullname:Components[n].CommentLead} ${dateformat("dd-MM-yyyy HH:mm:ss"):WorklogsComponents[n].CreatedId} ${dateformat("dd-MM-yyyy HH:mm:ss"):Worklogs[n].Date Started} Components[n].ProjectId} ${WorklogsComponents[n].Time Spent} ${Worklogs[n].TimeSpentFormatted} AssigneeType} #{end} or #{for <VariableName>=WorklogsCount} Content and Worklog Mappings. Example: ${Worklogs[VariableName].Field} #{end} |
The documents below demonstrate examples both in Word and Excel The image below demonstrates an example of a Word template that iterates over all the issue worklogscomponents.
or
The image below demonstrates an example of a template in Excel that iterates over issue work logs.
or
...
Iterating_Issue_Components.docx
Iterating_Issue_Components.xlsx
...
Iterating Issue Status Transitions
...
Because it is not known in advance how many components Status Transitions exist for an issue, you can iterate a section over all the components Status Transitions of an issue. This allows you to create a table that dynamically grows according to the number of existing componentsstatus transitions. The notation is:
Components Status Transitions Fields | Description | ||
---|---|---|---|
NameAuthor | The name author of the componentstatus transition | ||
DescriptionCreated | The description of the component | ||
Lead | The name of the component lead | ||
Id | The ID of the component | ||
ProjectId | The project ID of the component | ||
date the status transition was performed | |||
OldStatus | The old status of the status transition | ||
NewStatus | The new status of the status transition | AssigneeType | The assignee type of the component |
Code Block | ||||
---|---|---|---|---|
| ||||
#{for componentsstatusTransitions} ${ComponentsStatusTransitions[n].NameAuthor} ${Componentsdateformat("dd-MM-yyyy HH:mm:ss"):StatusTransitions[n].DescriptionCreated} ${fullname:ComponentsStatusTransitions[n].LeadOldStatus} ${ComponentsStatusTransitions[n].IdNewStatus} ${Components[n].ProjectId} ${Components[n].AssigneeType} #{end} |
The image below demonstrates an example of a Word template that iterates over issue components.
The image below demonstrates an example of an Excel template that iterates over issue components.
...
#{end}
or
#{for <VariableName>=StatusTransitionsCount}
Content and StatusTransitions Mappings. Example: ${StatusTransitions[VariableName].Field}
#{end} |
The documents below demonstrate examples both in Word and Excel template that iterates over all the issue status transitions.
Iterations_StatusTransitions.docx
Iterations_StatusTransitions.xlsx
...
Iterating Issue Attached Images
Because it is not known in advance how many Status Transitions Images can exist for an issue , you (as an attachment), you can iterate a section over all the Status Transitions attached images of an issue to get some metadata about them. This allows you to create a table that dynamically grows according to the number of existing status transitionsimages. The notation is:
Status Transitions Attachments Images Fields | Description | Author||
---|---|---|---|
ID | The | authorID of the | status transitionattached image |
CreatedImage | The date the status transition was performed | ||
OldStatus | The old status of the status transition | ||
NewStatus | The new status of the status transition | ||
image of the attached image | |||
Name | The name of the attached image | ||
Size | The size of the attached image | ||
HumanReadableSize | The size of the attached image | ||
Author | The author of the attached image | ||
Created | The date the attached image was created | ||
MimeType | The type of the attached image | ||
ThumbnailURL | The image thumbnail URL. |
Code Block | ||||
---|---|---|---|---|
| ||||
#{for images | ||||
Code Block | ||||
| ||||
#{for statusTransitions} ${StatusTransitionsImages[n].AuthorImage|maxwidth=150|maxheight=150} ${dateformat("dd-MM-yyyy HH:mm:ss"):StatusTransitionsImages[n].CreatedName} ${StatusTransitionsImages[n].OldStatusID} ${StatusTransitionsImages[n].NewStatusSize} #{end} or #{for <VariableName>=StatusTransitionsCount ${Images[n].HumanReadableSize} ${Images[n].Author} ${dateformat("dd-MM-yyyy HH:mm:ss"):Images[n].Created} ${Images[n].MimeType} ${Images[n].ThumbnailURL} #{end} or #{for <VariableName>=ImagesCount} Content and StatusTransitionsImages Mappings. Example: ${StatusTransitionsImages[VariableName].Field} #{end} |
The image below demonstrates an example of a Word The documents below demonstrate examples both in Word and Excel template that iterates over status transitionsall the issue attached images.
or
The image below demonstrates an example of an Excel template that iterates over status transitions.
or
Iterating Issue Attached Images
Because it is not known in advance how many Images can exist for an issue (as an attachment), you can iterate a section over all the attached images of an 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:
...
Iterations_AttachedImages.docx
Iterations_AttachedImages.xlsx
Info |
---|
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 |
You can use the mappings "width" and "height" to define the exact width and height of the printed image.
Code Block | ||||
---|---|---|---|---|
| ||||
Code Block | ||||
| ||||
#{for images} ${Images[n].Image|maxwidthwidth=150|maxheightheight=150} #{end} |
These values are in pixels and if you only define one of them the image will be rescaled.
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. |
...
Iterating Issue Attachments
Because it is not known in advance how many attachments exist in an issue, you can iterate a section over all the attachments of an issue. This allows you to create a table that dynamically grows according to the number of existing attachments. The notation is:
Attachments Fields | Description |
---|---|
ID | The ID of the attachment |
Name | The name of the attachment |
Author | The author of the attachment |
AuthorFullName | The full name of the author of the attachment |
Created | The date the attachment was created |
Size | The size of the attachment |
HumanReadableSize | The formatted size of the attachment |
MimeType | The type of attachment |
Code Block | ||||
---|---|---|---|---|
| ||||
#{for attachments ${Images[n].Name} ${Images[n].ID} ${Images[n].Size} ${Images[n].HumanReadableSize} ${Images[n].Author} ${dateformat("dd-MM-yyyy HH:mm:ss"):Images[n].Created} ${ImagesAttachments[n].MimeTypeID} ${ImagesAttachments[n].ThumbnailURLName} #{end} or #{for <VariableName>=ImagesCount ${Attachments[n].Author} ${Attachments[n].AuthorFullName} ${dateformat("dd-MM-yyyy HH:mm:ss"):Attachments[n].Created} Content and Images Mappings. Example:${Attachments[n].Size} ${Attachments[n].HumanReadableSize} ${ImagesAttachments[VariableNamen].FieldMimeType} #{end} |
The image below demonstrates an example of a Word template that iterates over attached images.
or
Info |
---|
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 |
You can use the mappings "width" and "height" to define the exact width and height of the printed image.
or
#{for <VariableName>=AttachmentsCount}
Content and Issue Mappings. Example: ${Attachments[VariableName].Field}
#{end} |
The documents below demonstrate examples both in Word and Excel template that iterates over all the issue attachments.
...
Iterating Issue Labels
Because it is not known in advance how many labels exist in an issue, you can iterate a section over all the labels of an issue. The notation is:
Attachments Fields | Description |
---|---|
Name | The name of the label |
Code Block | ||||
---|---|---|---|---|
#{for labels | ||||
Code Block | ||||
| ||||
#{for images} ${ImagesLabels[n].Image|width=150|height=150} #{end} |
These values are in pixels and if you only define one of them the image will be rescaled.
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 below demonstrates an example of an Excel template that iterates over attached images.
or
Iterating Issue Attachments
Because it is not known in advance how many attachments exist in an issue, you can iterate a section over all the attachments of an issue. This allows you to create a table that dynamically grows according to the number of existing attachments. The notation is:
...
Name}
#{end}
or
#{for <VariableName>=LabelsCount}
${Labels[VariableName].Name}
#{end} |
The documents below demonstrate examples both in Word and Excel template that iterates over all the issue comments.
...
Iterating Fix Versions of an Issue
You can iterate over all fix versions to which the issue belong to. The notation is:
Versions Fields | Description |
---|---|
Name | The version name |
Description | The version description |
Start date | Starting date of the version |
Release date | Release date of the version |
Archived | Boolean that indicates if the version is archived or not |
Released | Boolean that indicates if the version is released or not |
Code Blockcode | ||||
---|---|---|---|---|
| ||||
#{for attachmentsFixVersions} ${AttachmentsFixVersions[n].IDName} ${AttachmentsFixVersions[n].NameDescription} ${Attachmentsdateformat(“dd-MM-yyyy”):FixVersions[n].Author} ${Attachments[n].AuthorFullName} Start date} ${dateformat("dd“dd-MM-yyyy HH:mm:ss"yyyy”):AttachmentsFixVersions[n].CreatedRelease date} ${AttachmentsFixVersions[n].SizeArchived} ${AttachmentsFixVersions[n].HumanReadableSize} ${Attachments[n].MimeTypeReleased} #{end} or #{for <VariableName>=AttachmentsCountFixVersionsCount} Content and Versions Issue Mappings. Example: ${AttachmentsFixVersions[VariableName].Field} #{end} |
The image below demonstrates an example of a Word The documents below demonstrate examples both in Word and Excel template that iterates over attachmentsall the issue fix versions.
or
The image below demonstrates an example of an Excel template that iterates over attachments.
or
Iterating Issue Labels
Because it is not known in advance how many labels exist in an issue, you can iterate a section over all the labels of an issue. The notation is:
...
Iterating_Issue_FixVersions.docx
Iterating_Issue_FixVersions.xlsx
...
Iterating Affected Versions of an Issue
You can iterate over all affected versions to which the issue belong to. The notation is:
Versions Fields | Description |
---|---|
Name | The version name |
Description | The version description |
Start date | Starting date of the version |
Release date | Release date of the version |
Archived | Boolean that indicates if the version is archived or not |
Released | Boolean that indicates if the version is released or not |
Code Block | ||||
---|---|---|---|---|
| ||||
#{for AffectedVersions}
${AffectedVersions | ||||
Code Block | ||||
#{for labels} ${Labels[n].Name} #{end} or #{for <VariableName>=LabelsCount} ${Labels[VariableName].Name ${AffectedVersions[n].Description} ${dateformat(“dd-MM-yyyy”):AffectedVersions[n].Start date} ${dateformat(“dd-MM-yyyy”):AffectedVersions[n].Release date} ${AffectedVersions[n].Archived} ${AffectedVersions[n].Released} #{end} or #{for <VariableName>=AffectedVersionsCount} Content and Versions Issue Mappings. Example: ${AffectedVersions[VariableName].Field} #{end} |
The documents below demonstrate examples both in Word and Excel The image below demonstrates an example of a Word template that iterates over labelsall the issue affected versions.
or
The image below demonstrates an example of an Excel template that iterates over labels.
or
Iterating Fix Versions of an Issue
Iterating_Issue_AffectedVersions.docx
Iterating_Issue_AffectedVersions.xlsx
...
Iterating Project Versions
You can iterate over all project You can iterate over all fix versions to which the issue belong to. The notation is:
Project Versions Fields | Description |
---|---|
Name | The version name |
Description | The version description |
Start date | Starting date of the version |
Release date | Release date of the version |
Archived | Boolean that indicates if the version is archived or not |
Released | Boolean that indicates if the version is released or not |
Code Block | ||||
---|---|---|---|---|
| ||||
#{for FixVersions}
${FixVersions[n].Name}
${FixVersions[n].Description}
${dateformat(“dd-MM-yyyy”):FixVersions[n].Start date}
${dateformat(“dd-MM-yyyy”):FixVersions[n].Release date}
${FixVersions[n].Archived}
${FixVersions[n].Released}
#{end}
or
#{for <VariableName>=FixVersions}
Content and Versions Issue Mappings. Example: ${FixVersions[VariableName].Field}
#{end} |
The image below demonstrates an example of a Word template that iterates over fix versions that an issue belongs to.
or
The image below demonstrates an example of an Excel template that iterates over an fix versions that an issue belongs to.
or
Iterating Affected Versions of an Issue
You can iterate over all affected versions to which the issue belong to. The notation is:
...
Code Block | ||||
---|---|---|---|---|
| ||||
#{for AffectedVersions}
${AffectedVersions[n].Name}
${AffectedVersions[n].Description}
${dateformat(“dd-MM-yyyy”):AffectedVersions[n].Start date}
${dateformat(“dd-MM-yyyy”):AffectedVersions[n].Release date}
${AffectedVersions[n].Archived}
${AffectedVersions[n].Released}
#{end}
or
#{for <VariableName>=AffectedVersions}
Content and Versions Issue Mappings. Example: ${AffectedVersions[VariableName].Field}
#{end} |
The image below demonstrates an example of a Word template that iterates over affected versions that an issue belongs to.
or
The image below demonstrates an example of an Excel template that iterates over an affected versions that an issue belongs to.
or
Iterating Project Versions
You can iterate over all project versions to which the issue belong to. The notation is:
...
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}
${ProjectVersions[n].Archived}
${ProjectVersions[n].Released}
#{end}
or
#{for <VariableName>=ProjectVersions}
Content and Project Versions Mappings. Example: ${ProjectVersions[VariableName].Field}
#{end} |
The image below demonstrates an example of a Word template that iterates over project versions that an issue belongs to.
or
The image below demonstrates an example of an Excel template that iterates over project versions that an issue belongs to.
or
Iterating Issue Links
Because it is not known in advance how many linked issues exist for an issue, you can iterate a section over all the linked issues of an issue. This allows you to create a table that dynamically grows according to the number of existing linked issues. The notation is:
...
The application type of the link
...
The URL of the link
{for projectVersions}
${ProjectVersions[n].Name}
${ProjectVersions[n].Description}
${dateformat(“dd-MM-yyyy”):ProjectVersions[n].Start date}
${dateformat(“dd-MM-yyyy”):ProjectVersions[n].Release date}
${ProjectVersions[n].Archived}
${ProjectVersions[n].Released}
#{end}
or
#{for <VariableName>=ProjectVersionsCount}
Content and Project Versions Mappings. Example: ${ProjectVersions[VariableName].Field}
#{end} |
The documents below demonstrate examples both in Word and Excel template that iterates over all the issue project versions.
Iterations_ProjectVersions.docx
Iterations_ProjectVersions.xlsx
...
Iterating Issue Links
Because it is not known in advance how many linked issues exist for an issue, you can iterate a section over all the linked issues of an issue. This allows you to create a table that dynamically grows according to the number of existing linked issues. The notation is:
Links Fields | Description |
---|---|
LinkType | The type of the link |
Key | The key of the linked issue |
Summary | The summary of the linked issue |
URL | The URL of the link |
Code Block | ||||
---|---|---|---|---|
| ||||
#{for links}
${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 demonstrate examples both in Word and Excel template that iterates over all the issue links.
...
Iterating Issue Subtasks
Because it is not known in advance how many subtasks exist for an issue, you can iterate a section over all the subtasks of an issue. This allows you to create a table that dynamically grows according to the number of existing subtasks. The notation is:
Subtasks Fields | Description |
---|---|
Key | The key of the subtasks |
Summary | The summary of the subtasks |
AssigneeUserDisplayName | The assignee user of the subtasks |
Code Block | ||||
---|---|---|---|---|
| ||||
#{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 examples both in Word and Excel template that iterates over all the issue subtasks.
...
Iterating Issues In Epic
All fields listed here are available on IssuesInEpic[n] because they represent an issue.
Because it is not known in advance how many issues exist for an epic, you can iterate a section over all the issues of an epic issue. This allows you to create a table that dynamically grows according to the number of existing issues. The notation is:
Code Block | ||||
---|---|---|---|---|
| ||||
#{for IssuesInEpic}
${IssuesInEpic[n].Key}
${IssuesInEpic[n].Summary}
${IssuesInEpic[n].Description}
${IssuesInEpic[n].Epic Link.Key}
#{end}
or
#{for <VariableName>=IssuesInEpicCount}
Content and Issue Mappings. Example: ${IssuesInEpic[VariableName].Field}
#{end} |
The documents below demonstrate examples both in Word and Excel template that iterates over the issues in epic.
...
Iterating Project Components
You can iterate over all project components. The notation is:
Code Block | ||||
---|---|---|---|---|
| ||||
#{for ProjectComponents}
${ProjectComponents[n].Name}
${ProjectComponents[n].Description}
${fullname:ProjectComponents[n].Lead}
${ProjectComponents[n].Id}
${ProjectComponents[n].ProjectId}
${ProjectComponents[n].AssigneeType}
#{end}
#{for <VariableName>=ProjectComponentsCount}
Content and Components Mappings. Example: ${ProjectComponents[VariableName].Field}
#{end} |
The documents below demonstrate examples both in Word and Excel template that iterates over the project components.
Iterating_Issue_ProjectComponents.docx
Iterating_Issue_ProjectComponents.xlsx
Code Block | ||||
---|---|---|---|---|
| ||||
#{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} |
All fields listed here are available on Links[n] because they represent an issue. In addition, there are two new fields at the Links[n] level:
...
Returns the Application Type. The values can be:
Application Value | Description |
---|---|
JIRA | Link from the same Jira Instance |
External Jira | Link from the another Jira Instance |
Confluence | Link from a Confluence page |
External | External link |
...
Note: When the link you are iterating is of AppTypes External Jira or Confluence, the name is obtained using the Summary property.
The image below demonstrates an example of a Word template that iterates over linked issues.
or
The image below demonstrates an example of an Excel template that iterates over linked issues.
Iterating Issue Subtasks
Because it is not known in advance how many subtasks exist for an issue, you can iterate a section over all the subtasks of an issue. This allows you to create a table that dynamically grows according to the number of existing subtasks. The notation is:
...
Code Block | ||||
---|---|---|---|---|
| ||||
#{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 below demonstrates an example of a Word template that iterates over issue subtasks.
or
The image below demonstrates an example of an Excel template that iterates over issue subtasks.
or
Iterating Preconditions
From a Precondition, it's possible to export the following Xray data: Tests.
In addition to the usual Jira mappings, you can export the following fields:
- PreCondition.Type
- PreCondition.Definition
- PreConditionsCount
Code Block | ||
---|---|---|
| ||
Key: ${Key}
Summary: ${Summary}
Type: ${PreCondition.Type}
Definition: ${PreCondition.Definition}
Count: ${PreConditionsCount} |
Exporting Tests from a Precondition
Below you can find an example on how to iterate over the list of Tests associated with a Pre-condition.
Code Block | ||
---|---|---|
| ||
Total number of associated tests: ${TestsCount}
// Iterating each test
#{for tests}
Key: ${Tests[n].Key}
Test Status: ${Tests[n].TestStatus}
// Iterating over test steps for each test
#{for m=Tests[n].TestStepsCount}
Action: ${Tests[n].TestSteps[m].Action}
Data: ${Tests[n].TestSteps[m].Data}
Expected Result: ${Tests[n].TestSteps[m].ExpectedResult}
#{end}
#{end}
or
// Iterating each test
#{for j=TestsCount}
Key: ${Tests[j].Key}
Test Status: ${Tests[j].TestStatus}
// Iterating over test steps for each test
#{for m=Tests[j].TestStepsCount}
Action: ${Tests[j].TestSteps[m].Action}
Data: ${Tests[j].TestSteps[m].Data}
Expected Result: ${Tests[j].TestSteps[m].ExpectedResult}
#{end}
#{end} |
For more detailed information on how to export Tests and its information please check the Test section.
Iterating Tests
From a Test, it's possible to export the following Xray data: Preconditions, Test Sets, TestPlans, Test Executions, and Test Runs.
In addition to the usual Jira mappings, you can export the following fields:
- Cucumber Scenario
- Generic Test Definition
- TestType
- TestStatus
- TestStepsCount
- TestsCount
Code Block | ||
---|---|---|
| ||
Key: ${Key}
Cucumber Scenario: ${Cucumber Scenario}
Generic Test Definition: ${Generic Test Definition}
Test Type: ${TestType}
Test Status: ${TestStatus}
Test Steps Total: ${TestStepsCount}
Tests Count: ${TestsCount} |
Exporting Test Steps from a Test
For each Test Step you can export the following fields:
- Action
- AttachmentsCount
- Data
- ExpectedResult
- StepNumber
Below you can find an example on how to iterate over the list of TestSteps associated with a Test.
Code Block | ||
---|---|---|
| ||
Total number of associated test steps: ${TestStepsCount}
// Iterating each test step
#{for teststeps}
Action: ${TestSteps[n].Action}
Data: ${TestSteps[n].Data}
Expected Result: ${TestSteps[n].ExpectedResult}
Step Number: ${TestSteps[n].StepNumber}
// Iterating over attachments for each test step
#{for l=TestSteps[n].AttachmentsCount}
Id: ${TestSteps[n].Attachments[l].Id}
Name: ${TestSteps[n].Attachments[l].Name}
#{end}
#{end}
or
// Iterating each test step
#{for j=TestStepsCount}
Action: ${TestSteps[j].Action}
Data: ${TestSteps[j].Data}
Expected Result: ${TestSteps[j].ExpectedResult}
Step Number: ${TestSteps[j].StepNumber}
// Iterating over attachments for each test step
#{for l=TestSteps[j].AttachmentsCount}
Id: ${TestSteps[j].Attachments[l].Id}
Name: ${TestSteps[j].Attachments[l].Name}
#{end}
#{end} |
Exporting Preconditions from a Test
Below you can find an example on how to iterate over the list of Preconditions associated with a Test.
Code Block | ||
---|---|---|
| ||
Total number of associated preconditions: ${PreConditionsCount}
// Iterating each precondition
#{for preconditions}
Key: ${PreConditions[n].Key}
Type: ${PreConditions[n].PreCondition.Type}
Definition: ${PreConditions[n].PreCondition.Definition}
#{end}
or
// Iterating each precondition
#{for j=PreConditionsCount}
Summary: ${PreConditions[j].Summary}
Type: ${PreConditions[j].PreCondition.Type}
Definition: ${PreConditions[j].PreCondition.Definition}
#{end} |
For more detailed information on how to export Pre-conditions and its information please check the Precondition section.
Exporting Test Sets from a Test
Below you can find an example on how to iterate over the list of TestSets associated with a Test.
Code Block | ||
---|---|---|
| ||
Total number of associated test sets: ${TestSetsCount}
// Iterating each test set
#{for testSets}
Description: ${TestSets[n].Description}
#{end}
or
// Iterating each test set
#{for j=TestSetsCount}
Summary: ${TestSets[j].Summary}
#{end} |
For more detailed information on how to export Test Sets and its information please check the Test Set section.
Exporting Test Plans from a Test
Below you can find an example on how to iterate over the list of TestPlans associated with a Test.
Code Block | ||
---|---|---|
| ||
Total number of associated test plans: ${TestPlansCount}
// Iterating each test plan
#{for testPlans}
Summary: ${TestPlans[n].Summary}
#{end}
or
// Iterating each test plan
#{for j=TestPlansCount}
Description: ${TestPlans[j].Description}
#{end} |
For more detailed information on how to export Test Plans and its information please check the Test Plan section.
Exporting Test Executions from a Test
Below you can find an example on how to iterate over the list of TestExecutions associated with a Test.
Code Block | ||
---|---|---|
| ||
Total number of associated test executions: ${TestExecutionsCount}
// Iterating each test execution
#{for testExecutions}
Key: ${TestExecutions[n].Key}
Test Environments: ${TestExecutions[n].TestEnvironments}
#{end}
or
// Iterating each test execution
#{for j=TestExecutionsCount}
Summary: ${TestExecutions[j].Summary}
Test Environments: ${TestExecutions[j].TestEnvironments}
#{end} |
For more detailed information on how to export Test Executions and its information please check the Test Execution section.
Exporting Test Runs from a Test
Below you can find an example on how to iterate over the list of TestRuns associated with a Test.
Code Block | ||
---|---|---|
| ||
Total number of associated test runs: ${TestRunsCount}
// Iterating each test run
#{for testruns}
Assignee Id: ${TestRuns[n].AssigneeId}
Key: ${TestRuns[n].Key}
Summary: ${TestRuns[n].Summary}
Comment: ${TestRuns[n].Comment}
Generic Test Definition: ${TestRuns[n].Generic Test Definition}
Cucumber Scenario: ${TestRuns[n].Cucumber Scenario}
Executed by: ${TestRuns[n].Executed By}
Execution Status: ${TestRuns[n].Execution Status}
Started on: ${TestRuns[n].Started On}
Finished on: ${TestRuns[n].Finished On}
// Iterating over execution evidences for each test run
Execution Evidences Total: ${TestRuns[n].ExecutionEvidencesCount}
#{for m=TestRuns[n].ExecutionEvidencesCount}
Id: ${TestRuns[n].ExecutionEvidences[m].Id}
Name: ${TestRuns[n].ExecutionEvidences[m].Name}
#{end}
// Iterating over execution defects for each test run
Execution Defects Total: ${TestRuns[n].ExecutionDefectsCount}
#{for m=TestRuns[n].ExecutionDefectsCount}
Id: ${TestRuns[n].ExecutionDefects[m].Id}
Description: ${TestRuns[n].ExecutionDefects[m].Description}
Key: ${TestRuns[n].ExecutionDefects[m].Key}
Summary: ${TestRuns[n].ExecutionDefects[m].Summary}
#{end}
// Iterating over test steps for each test run
Test Steps Total: ${TestRuns[n].TestStepsCount}
#{for m=TestRuns[n].TestStepsCount}
Action: ${TestRuns[n].TestSteps[m].Action}
Comment: ${TestRuns[n].TestSteps[m].Comment}
Data: ${TestRuns[n].TestSteps[m].Data}
Expected Result: ${TestRuns[n].TestSteps[m].ExpectedResult}
Actual Result: ${TestRuns[n].TestSteps[m].ActualResult}
Status: ${TestRuns[n].TestSteps[m].Status}
Step Number: ${TestRuns[n].TestSteps[m].StepNumber}
// Iterating over attachments for each test step
#{for l=TestRuns[n].TestSteps[m].AttachmentsCount}
Id: ${TestRuns[n].TestSteps[m].Attachments[l].Id}
Name: ${TestRuns[n].TestSteps[m].Attachments[l].Name}
#{end}
// Iterating over evidences for each test step
#{for l=TestRuns[n].TestSteps[m].EvidencesCount}
Id: ${TestRuns[n].TestSteps[m].Evidences[l].Id}
Name: ${TestRuns[n].TestSteps[m].Evidences[l].Name}
#{end}
// Iterating over defects for each test step
#{for l=TestRuns[n].TestSteps[m].DefectsCount}
Description: ${TestRuns[n].TestSteps[m].Defects[l].Description}
Id: ${TestRuns[n].TestSteps[m].Defects[l].Id}
Key: ${TestRuns[n].TestSteps[m].Defects[l].Key}
Summary: ${TestRuns[n].TestSteps[m].Defects[l].Summary}
#{end}
#{end}
#{end} |
Iterating Test Executions
From a Test Execution, it's possible to export the following Xray data: Tests and Test Runs.
In addition to the usual Jira mappings, you can export the following fields:
- TestEnvironments
Code Block | ||
---|---|---|
| ||
Key: ${Key}
Description: ${Description}
Test Environments: ${TestEnvironments}
#Overall Execution Status (percentage + total of testes per status)
TO DO: ${Overall Execution Status.TO DO.Percentage}% - ${Overall Execution Status.TO DO.Count}
EXECUTING: ${Overall Execution Status.EXECUTING.Percentage}% - ${Overall Execution Status.EXECUTING.Count}
PASSED: ${Overall Execution Status.PASSED.Percentage}% - ${Overall Execution Status.PASSED.Count}
FAILED: ${Overall Execution Status.FAILED.Percentage}% - ${Overall Execution Status.FAILED.Count}
ABORTED: ${Overall Execution Status.ABORTED.Percentage}% - ${Overall Execution Status.ABORTED.Count} |
Exporting Tests from a Test Execution
Below you can find an example on how to iterate over the list of Tests associated with a Test Execution.
Code Block | ||
---|---|---|
| ||
Total number of associated tests: ${TestsCount}
// Iterating each test
#{for tests}
Key: ${Tests[n].Key}
Test Status: ${Tests[n].TestStatus}
// Iterating over test steps for each test
#{for m=Tests[n].TestStepsCount}
Action: ${Tests[n].TestSteps[m].Action}
Data: ${Tests[n].TestSteps[m].Data}
Expected Result: ${Tests[n].TestSteps[m].ExpectedResult}
#{end}
#{end}
or
// Iterating each test
#{for j=TestsCount}
Key: ${Tests[j].Key}
Test Status: ${Tests[j].TestStatus}
// Iterating over test steps for each test
#{for m=Tests[j].TestStepsCount}
Action: ${Tests[j].TestSteps[m].Action}
Data: ${Tests[j].TestSteps[m].Data}
Expected Result: ${Tests[j].TestSteps[m].ExpectedResult}
#{end}
#{end} |
For more detailed information on how to export Tests and its information please check the Test section.
Exporting Test Plans from a Test Execution
Below you can find an example on how to iterate over the list of TestPlans associated with a Test Execution.
Code Block | ||
---|---|---|
| ||
Total number of associated test plans: ${TestPlansCount}
// Iterating each test plan
#{for testPlans}
Summary: ${TestPlans[n].Summary}
#{end}
or
// Iterating each test plan
#{for j=TestPlansCount}
Description: ${TestPlans[j].Description}
#{end} |
For more detailed information on how to export Test Plans and its information please check the Test Plan page.
Exporting Test Runs from a Test Execution
Below you can find an example on how to iterate over the list of TestRuns associated with a Test Execution.
Code Block | ||
---|---|---|
| ||
Total number of associated test runs: ${TestRunsCount}
// Iterating each test run
#{for testruns}
Assignee Id: ${TestRuns[n].AssigneeId}
Key: ${TestRuns[n].Key}
Summary: ${TestRuns[n].Summary}
Comment: ${TestRuns[n].Comment}
Generic Test Definition: ${TestRuns[n].Generic Test Definition}
Cucumber Scenario: ${TestRuns[n].Cucumber Scenario}
Executed by: ${fullname:TestRuns[n].Executed By}
Execution Status: ${TestRuns[n].Execution Status}
Started on: ${TestRuns[n].Started On}
Finished on: ${TestRuns[n].Finished On}
// Iterating over execution evidences for each test run
Execution Evidences Total: ${TestRuns[n].ExecutionEvidencesCount}
#{for m=TestRuns[n].ExecutionEvidencesCount}
Id: ${TestRuns[n].ExecutionEvidences[m].Id}
Name: ${TestRuns[n].ExecutionEvidences[m].Name}
#{end}
// Iterating over execution defects for each test run
Execution Defects Total: ${TestRuns[n].ExecutionDefectsCount}
#{for m=TestRuns[n].ExecutionDefectsCount}
Id: ${TestRuns[n].ExecutionDefects[m].Id}
Description: ${TestRuns[n].ExecutionDefects[m].Description}
Key: ${TestRuns[n].ExecutionDefects[m].Key}
Summary: ${TestRuns[n].ExecutionDefects[m].Summary}
#{end}
// Iterating over test steps for each test run
Test Steps Total: ${TestRuns[n].TestStepsCount}
#{for m=TestRuns[n].TestStepsCount}
Action: ${TestRuns[n].TestSteps[m].Action}
Comment: ${TestRuns[n].TestSteps[m].Comment}
Data: ${TestRuns[n].TestSteps[m].Data}
Expected Result: ${TestRuns[n].TestSteps[m].ExpectedResult}
Actual Result: ${TestRuns[n].TestSteps[m].ActualResult}
Status: ${TestRuns[n].TestSteps[m].Status}
Step Number: ${TestRuns[n].TestSteps[m].StepNumber}
// Iterating over attachments for each test step
#{for l=TestRuns[n].TestSteps[m].AttachmentsCount}
Id: ${TestRuns[n].TestSteps[m].Attachments[l].Id}
Name: ${TestRuns[n].TestSteps[m].Attachments[l].Name}
#{end}
// Iterating over evidences for each test step
#{for l=TestRuns[n].TestSteps[m].EvidencesCount}
Id: ${TestRuns[n].TestSteps[m].Evidences[l].Id}
Name: ${TestRuns[n].TestSteps[m].Evidences[l].Name}
#{end}
// Iterating over defects for each test step
#{for l=TestRuns[n].TestSteps[m].DefectsCount}
Description: ${TestRuns[n].TestSteps[m].Defects[l].Description}
Id: ${TestRuns[n].TestSteps[m].Defects[l].Id}
Key: ${TestRuns[n].TestSteps[m].Defects[l].Key}
Summary: ${TestRuns[n].TestSteps[m].Defects[l].Summary}
#{end}
#{end}
#{end} |
Iterating Test Plans
From a Test Plan, it's possible to export the following Xray data: Tests and Test Executions.
Given that the Test Plan behaves like a regular JIRA issue, you can also export any other JIRA field.
Code Block | ||
---|---|---|
| ||
Key: ${Key}
Description: ${Description}
#Overall Execution Status (percentage + total of testes per status)
TO DO: ${Overall Execution Status.TO DO.Percentage}% - ${Overall Execution Status.TO DO.Count}
EXECUTING: ${Overall Execution Status.EXECUTING.Percentage}% - ${Overall Execution Status.EXECUTING.Count}
PASSED: ${Overall Execution Status.PASSED.Percentage}% - ${Overall Execution Status.PASSED.Count}
FAILED: ${Overall Execution Status.FAILED.Percentage}% - ${Overall Execution Status.FAILED.Count}
ABORTED: ${Overall Execution Status.ABORTED.Percentage}% - ${Overall Execution Status.ABORTED.Count} |
Exporting Tests from a Test Plan
Below you can find an example on how to iterate over the list of Tests associated with a Test Plan.
Code Block | ||
---|---|---|
| ||
Total number of associated tests: ${TestsCount}
// Iterating each test
#{for tests}
Key: ${Tests[n].Key}
Test Status: ${Tests[n].TestStatus}
// Iterating over test steps for each test
#{for m=Tests[n].TestStepsCount}
Action: ${Tests[n].TestSteps[m].Action}
Data: ${Tests[n].TestSteps[m].Data}
Expected Result: ${Tests[n].TestSteps[m].ExpectedResult}
#{end}
#{end}
or
// Iterating each test
#{for j=TestsCount}
Key: ${Tests[j].Key}
Test Status: ${Tests[j].TestStatus}
// Iterating over test steps for each test
#{for m=Tests[j].TestStepsCount}
Action: ${Tests[j].TestSteps[m].Action}
Data: ${Tests[j].TestSteps[m].Data}
Expected Result: ${Tests[j].TestSteps[m].ExpectedResult}
#{end}
#{end} |
For more detailed information on how to export Tests and its information please check the Test section.
Exporting Test Executions from a Test Plan
Below you can find an example on how to iterate over the list of TestExecutions associated with a Test.
Code Block | ||
---|---|---|
| ||
Total number of associated test executions: ${TestExecutionsCount}
// Iterating each test execution
#{for testExecutions}
Key: ${TestExecutions[n].Key}
Test Environments: ${TestExecutions[n].TestEnvironments}
#{end}
or
// Iterating each test execution
#{for j=TestExecutionsCount}
Summary: ${TestExecutions[j].Summary}
Test Environments: ${TestExecutions[j].TestEnvironments}
#{end} |
For more detailed information on how to export Test Executions and its information please check the Test Execution section.
Iterating Test Sets
From a Test Set, it's possible to export the following Xray data: Tests.
Given that the Test Set behaves like a regular Jira issue, you can also export any other Jira field.
Code Block | ||
---|---|---|
| ||
Key: ${Key}
Description: ${Description}
#Overall Execution Status (percentage + total of testes per status)
TO DO: ${Overall Execution Status.TO DO.Percentage}% - ${Overall Execution Status.TO DO.Count}
EXECUTING: ${Overall Execution Status.EXECUTING.Percentage}% - ${Overall Execution Status.EXECUTING.Count}
PASSED: ${Overall Execution Status.PASSED.Percentage}% - ${Overall Execution Status.PASSED.Count}
FAILED: ${Overall Execution Status.FAILED.Percentage}% - ${Overall Execution Status.FAILED.Count}
ABORTED: ${Overall Execution Status.ABORTED.Percentage}% - ${Overall Execution Status.ABORTED.Count} |
Exporting Tests from a Test Set
Below you can find an example on how to iterate over the list of Tests associated with a Test Set.
Code Block | ||
---|---|---|
| ||
Total number of associated tests: ${TestsCount}
// Iterating each test
#{for tests}
Key: ${Tests[n].Key}
Test Status: ${Tests[n].TestStatus}
// Iterating over test steps for each test
#{for m=Tests[n].TestStepsCount}
Action: ${Tests[n].TestSteps[m].Action}
Data: ${Tests[n].TestSteps[m].Data}
Expected Result: ${Tests[n].TestSteps[m].ExpectedResult}
#{end}
#{end}
or
// Iterating each test
#{for j=TestsCount}
Key: ${Tests[j].Key}
Test Status: ${Tests[j].TestStatus}
// Iterating over test steps for each test
#{for m=Tests[j].TestStepsCount}
Action: ${Tests[j].TestSteps[m].Action}
Data: ${Tests[j].TestSteps[m].Data}
Expected Result: ${Tests[j].TestSteps[m].ExpectedResult}
#{end}
#{end} |
For more detailed information on how to export Tests and its information please check the Test page.
...
Applying filters to Iterations
If you want to take the previous iterations over comments, subtasks, and 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:
...
It is also possible to format fields inside iteration filters.
The image below demonstrates an example documents below demonstrate examples of a template templates that iterates iterate over issue links and comments with filters being applied.
Links Bugs with High Priority:
Nested Iterations:
Links_with_nested_Iterations.docx
Links_with_nested_Iterations.xlsx
For a working example of this functionality, check the template Sample Iterations in the Template Store.
...
Iterating in the same line of the document
You can also possible to iterate values in the same line of the document. This can be useful if you want to display a list of Subtasks on Linked Issues in the same line, separated by commas or spaces.
Code Block | ||||
---|---|---|---|---|
| ||||
Users that added comments to this issue: #{for comments}${Comments[n].Author} #{end} Subtasks of this issue: #{for j=SubtasksCount}${Subtasks[j].Key};#{end} Linked issues this issue duplicates: #{for j=LinksCount|filter=%{'${Links[j].LinkType}'.equals('duplicates')}}${Links[j].Key} #{end} |
...
Iterating in the same cell in an Excel document
You can also iterate values in the same cell in an Excel document. You can achieve this by simply making your Iteration inside the same cell.
...
Code Block | ||||
---|---|---|---|---|
| ||||
Issue iteration as a demonstration. Copy this iteration below and paste it into a cell. &{for issues} ${Key} &{end} |
...
Iterating with the BREAK or CONTINUE statement
You can iterate anything, set up a Conditional expression and then utilize the BREAK and CONTINUE statements.
...
Code Block | ||||
---|---|---|---|---|
| ||||
Imagine that you have a Jira Issue that contains these comments: - Hello - World - Greetings - Hi For the Break functionality, lets say that you want to stop the iteration if the current comment is "World". Here is the template for that: #{for comments} Current Comment: ${Comments[n].Body} #{if (%{'${Comments[n].Body}'.equals('World')})} #{break} #{end} Current Comment Author: ${Comments[n].Author} #{end} In this case, Xporter for Jira will print the comment "Hello" and it´s author. Next it will print the comment Body "World" but since the Conditional expression is true, it will stop the iteration all together and not print anything else. Note: Anything after the #{break} mapping will not be printed in the exported document. For the Continue functionality, lets say that you want to skip to the next iteration if the current comment is "World", bypassing the Author mapping for this iteration. Here is the template for that: #{for comments} Current Comment: ${Comments[n].Body} #{if (%{'${Comments[n].Body}'.equals('World')})} #{continue} #{end} Current Comment Author: ${Comments[n].Author} #{end} In this case, Xporter for Jira will print the comment "Hello" and it´s author. Next, it will print the comment Body "World" but since the Conditional expression is true, it will continue to the next iteration, not printing the Author of the "World" comment. |
...
Sorting iterations
Imagine that you have an iteration and want to sort it by any field that it can export normally. This will be the header for such an iteration:
...
Code Block | ||||
---|---|---|---|---|
| ||||
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 Bulk export
The sortby can also be used to sort a &{for issues} iteration on a Bulk Export.
...