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 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 declare a Table Grid you can do as follows:To export the data you have in your Table Grid, you need to use the following definition

Code Block
titleTable Grid Iteration
collapsetrue
//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
titleNotes
  • 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.
DateTime


Helpers

In order 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) will be exported. To get the actual date from this we and if you want to get the right format of the date and time you can use the following script:

Code Block
titleDateTime Formating Example
collapsetrue
// 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}


DateThe Table Grids type Date will, once again, export the time in seconds, but this time without the time component. We can format the retrieved value by using a script like the one represented in the following example

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
titleDate Formating Example
collapsetrue
// 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}


TimeThe Time type will return the time as the

While exporting a column which type is Time the time is going to be exported as a number of seconds since January 1st 1970(the epoch time) . We can format the retrieved value by using a script like the one represented in the following exampleand if you want to get the right format of the date you can use the following script:
Code Block
titleTime Formating Example
collapsetrue
// 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}

Boolean

The Boolean type will retrieve only 2 simple values,


Checkbox

While exporting a column which type is Checkbox you are going to receive a Boolean that can be true or false. We  We can format the retrieved value by using a script like the one represented in the following example:
Code Block
titleBoolean Formating Example
collapsetrue
// Replace the TABLE_NAME with the Table Grids' name and BooleanBOOLEAN_COLUMN with the column id.
Boolean#{for n=TableGrid.TABLE_NAMECount}
	Checkbox: %{${TableGrid.TABLE_NAME[n].BOOLEAN_COLUMN} ? 'Checked' : 'Not Checked' }
#{end}

Other Types

The other types contained in Table Grid Next Generation are automatically formated, or already formated once retrieved, by Xporter. No further formating is needed, but, if desired, you can still format your data by using the script tags and JavaScript.

Sample Table Grid Export


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
titleBoolean Formating Example
collapsetrue
// Replace the TABLE_NAME with the Table Grids' name and ATTACHMENT_COLUMN with the column id.
#{for n=TableGrid.TABLE_NAMECount}
	Attachment: !{${TableGrid.TABLE_NAME[n].ATTACHMENT_COLUMN}}
#{end}

Example

Div
styleposition: fixed; top: 100px; width: 20%;
Panel
borderColorlightgrey
borderWidth1px
borderStylesolid

Table of Contents:

Table of Contents