Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
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:
Code Block | ||||
---|---|---|---|---|
| ||||
//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} |
Info | ||
---|---|---|
| ||
|
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:
Code Block | ||||
---|---|---|---|---|
| ||||
// 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.TABLE_NAME[n].DATETIME_COLUMN}); date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate() + ' ' + (date.getHours() - 1) + ':' + date.getMinutes()} #{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:
Code Block | ||||
---|---|---|---|---|
| ||||
// 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:Code Block | ||||
---|---|---|---|---|
| ||||
// 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:Code Block | ||||
---|---|---|---|---|
| ||||
// 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:
Code Block | ||||
---|---|---|---|---|
| ||||
// 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:
IMAGE
Result of the template with the table Grid you can see in the image above:
IMAGE
In order to get the same result on your generated document, check the following template used:
DOC OF THE TEMPLATE
Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|