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}

You can also get the number of rows contained in a Table Grid by using the following mapping, this is the same mapping used in the for-iteration declaration:

Code Block
titleTable Grid Iteration Row Count
// You need to replace TABLE_NAME with your Table Grids' name.
${TableGrid.TABLE_NAMECount}

Table Columns

In order to obtain the values contained inside a Table Grid, you can use the iteration previously mentioned:

Code Block
titleTable Grid Iteration Column
// You need to replace TABLE_NAME with your Table Grids' name.
#{for n=TableGrid.TABLE_NAMECount}
	// Replace the TABLE_NAME with the Table Grids' name and COLUMN_ID with the column id.
	${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

While exporting a column which type is DateTime the time in seconds (epoch time) will be exported. To get the actual date from this we 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.
DateTime: %{var date = new Date(${TableGrid.TABLE_NAME[n].DATETIME_COLUMN}); date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate() + ' ' + (date.getHours() - 1) + ':' + date.getMinutes()}

Date

The 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:

Code Block
titleDate Formating Example
collapsetrue
// Replace the TABLE_NAME with the Table Grids' name and DATE_COLUMN with the column id.
Date: %{var date = new Date(${TableGrid.TABLE_NAME[n].DATE_COLUMN}); date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()}

Time

The Time type will return the time as the 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 example:

Code Block
titleTime Formating Example
collapsetrue
// Replace the TABLE_NAME with the Table Grids' name and TIME_COLUMN with the column id.
Time: %{let date = new Date(${TableGrid.TABLE_NAME[n].TIME_COLUMN}); (date.getHours() - 1) + ':'+ date.getMinutes()}


Boolean

The Boolean type will retrieve only 2 simple values, true or false. 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 Boolean_COLUMN with the column id.
Boolean: %{${TableGrid.TABLE_NAME[n].BOOLEAN_COLUMN} ? 'Checked' : 'Not Checked' }

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

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

Table of Contents:

Table of Contents