- Created by Unknown User (palf), last modified by Unknown User (afpc) on Mar 29, 2021
Table Grid Next Generation mappings are based on the columns you create for your table grid. Each row present on the table grid from the Jira issue will match with a row of the iteration and the order will be the same as displayed in your exported Jira issue.
Definition
To export the data you have in your Table Grid, you need to use the following definition:
//You can get the number of rows contained in a Table Grid by using the following mapping ${TableGrid.TABLE_NAMECount} #{for n=TableGrid.TABLE_NAMECount} // Table Grid fields will go in here. ${TableGrid.TABLE_NAME[n].COLUMN_ID} #{end}
Notes
- You need to replace the TABLE_NAME with your Table Grids' name;
- You need to replace the COLUMN_ID with the column id. The column id is the "Identifier" used while creating the Table Grids' column. This identifier can also be verified in the list of columns present in the Table Grid between parenthesis.
- In order to export all the columns, that you have in your table grid, you only need to add this "${TableGrid.TABLE_NAME[n].COLUMN_ID}" for each column.
Helpers
In order to accurately export some mappings with the right format, in this section we present you some helpers to properly export the information in your table grid:
Date Time
While exporting a column which type is DateTime the time is going to be exported in seconds(epoch time) and if you want to get the right format of the date and time you can use the following script:
// Replace the TABLE_NAME with the Table Grids' name and DATETIME_COLUMN with the column id. #{for n=TableGrid.TABLE_NAMECount} DateTime: %{var date = new Date(${TableGrid.TableGrid_Name[n].DATETIME_COLUMN}); date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate() + ' ' + (date.getHours() - 1) + ':' + ("0" + date.getMinutes()).slice(-2)} #{end}
Date
While exporting a column which type is Date the date is going to be exported as a number(epoch time) and if you want to get the right format of the date you can use the following script:
// Replace the TABLE_NAME with the Table Grids' name and DATE_COLUMN with the column id. #{for n=TableGrid.TABLE_NAMECount} Date: %{var date = new Date(${TableGrid.TABLE_NAME[n].DATE_COLUMN}); date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()} #{end}
Time
While exporting a column which type is Time the time is going to be exported as a number of seconds since January 1st 1970 (epoch time) and if you want to get the right format of the date you can use the following script:// Replace the TABLE_NAME with the Table Grids' name and TIME_COLUMN with the column id. #{for n=TableGrid.TABLE_NAMECount} Time: %{let date = new Date(${TableGrid.TABLE_NAME[n].TIME_COLUMN}); (date.getHours() - 1) + ':'+ date.getMinutes()} #{end}
Checkbox
While exporting a column which type is Checkbox you are going to receive a Boolean that can be true or false. We can format the retrieved value by using a script like the one represented in the following example:// Replace the TABLE_NAME with the Table Grids' name and BOOLEAN_COLUMN with the column id. #{for n=TableGrid.TABLE_NAMECount} Checkbox: %{${TableGrid.TABLE_NAME[n].BOOLEAN_COLUMN} ? 'Checked' : 'Not Checked' } #{end}
Attachment
While exporting a column which type is Attachment you are going to receive the URL of the attachment. However, if your attachment is an image you can export the image and not the URL, using the following script:
// Replace the TABLE_NAME with the Table Grids' name and ATTACHMENT_COLUMN with the column id. #{for n=TableGrid.TABLE_NAMECount} Attachment URL: ${TableGrid.TABLE_NAME[n].ATTACHMENT_COLUMN} Attachment Image: !{${TableGrid.TABLE_NAME[n].ATTACHMENT_COLUMN}} #{end}
Example
Example of a Table Grid created in one Jira Issue:
Result of the template with the table Grid you can see in the image above:
Template
The documents below shows examples how you can export yours Tables Grids'.
Template Store
- The original and the sample templates are available in the Template Store and if you want you can install the original template directly in Xporter.
Single Export:
Bulk Export:
Table of Contents:
- No labels