Table Grid Migration

Table Grid Migration

This page describes how you can transfer Table Grid Editor custom field data and configuration into Table Grid Next Generation custom field.

The reason we are switching to Table Grid Next Generation is technical. Table Grid Editor development started in 2011 using frameworks and components which are not supported anymore.

 

While Table Grid Migration Tool is not officially marked as Data Center compatible, it is fully functional on DC Jira instances as per our internal testing as well as reported user experience.

Table Grid Next Generation is an alternative whose functionalities overlap 80% of those of Table Grid Editor's. It is based on recent technology. We've designed the user interface for intuitive configuration. The add-on is compatible with Jira Cloud and Service Desk.  

 

You can join a migration program with a table grid migration tool and convert your active TGE license to a TGNG license at no cost. To convert your license submit a request with your SEN number and technical contact e-mail. We will then provide a new TGNG license with the same data (Jira users, expiry date).

 

Introduction to the Table Grid Migration Tool

Table Grid Migration Tool is an extension for the Table Grid Next Generation application. It helps you migrate grid configuration and data from Table Grid Editor custom field to Table Grid Next Generation. You can download the tool as a separate Jira Server app

It's a simple tool with an intuitive interface. You need to select the Table Grid Editor custom field you want to migrate. Then validate the grid data and run the migration process. A new Table Grid Next Generation custom field will be created. The field will include the following data from the Table Grid Editor custom field:

  • grid configurations for all field contexts

  • screens configuration

  • all grid data

The extension is free to install and use. 

 

Limitations

Since Table Grid Next Generation is not yet feature-complete, the migration process is limited to the supported features only. Check the feature comparison table here.

The following data won't be migrated:

  • Formulas won't be migrated.
      Formula results will be transferred into the new grid. The column type would be the same as the type of results data.

  • Data sources

  • Dynamic list with SQL queries inside

  • Driving Tables

  • Grid initialization properties

  • Multi Cascading Select custom field

  • Table Grid Reader custom field

 

Compatibility

Use a compatible version of the Table Grid Migration Tool. The version depends on the Table Grid Editor and Table Grid Next Generation versions you are using.

TGMT

TGNG

TGE

TGMT

TGNG

TGE

1.0

1.5.1 - 1.6.2

1.29.10

2.0

1.7.0 

1.29.11

3.0

1.8.0 

1.29.11

4.1

1.11.0

1.29.12

4.5

2.3.1

1.29.38

4.6

4.4.0

1.30.14

How to Migrate Data from TGE to TGNG

Pre-requisites

  • Table Grid Next Generation app installed and updated to the 2.3.1 version 

  • Table Grid Editor app installed and updated to the 1.29.38 version

  • Table Grid Migration Tool extension installed

  • Jira re-index performed 

1. Navigate to Table Grid Migration Block in your Jira Administration 

2. Select TGE Field 

2. Validate Data

The validation process helps to check if the configuration of the Tale Grid Editor custom field can be migrated to a Table Grid Next Generation custom field.

It provides a detailed overview of the configuration elements that won't be transferred during the migration. 

If the grid includes some configuration that is not supported by Table Grid Next Generation app, you'll be notified. The notification includes detailed information about the elements that would not be transferred.

For example, you have a formula in your Table Grid Editor custom field. Table Grid Next Generation does not support the formula from Table Grid Editor. In this case, you will get the following notification.

2. Run Migration 

The migration tool creates a new Table Grid Next Generation custom field with the same data as Table Grid Editor custom field.

You will get a notification once the migration is finished.

 Troubleshooting

When you faced this and can not see the logs, try to check those steps if it can be migrated:

  1. Create a TGE field with customer’s config

  2. Check if it’s migratable

  3. If it can not - check if it contains “defaultValue

  4. If “defaultValue” is present, remove it and try the migration again

  5. If “defaultValue” is not present or removing it didn’t help - try removing other optional config properties (width, required, etc. Anything besides “col.xyz”, “col.xyz.type” and if it’s a list - the options”

  6. Try migrating again. If stripping the config didn’t help — it means that the error is somewhere else/deeper, contact our support via portal.

 

Script-based Alternative (Just workaround, not recommended)

If, for one reason or another, you are unable to use the Table Grid Migration Tool, you may migrate the TGE data to TGNG by manually creating matching TGNG configurations for each of your TGE fields and then running the following script:

import java.lang.Exception import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.crowd.embedded.api.User import com.atlassian.plugin.PluginAccessor import com.atlassian.jira.user.ApplicationUser //////////////////////////////////////////// // ***** CHANGE VARIABLES HERE ***** String jqlQuery = "========" // Example: "issuekey = 'TEST-22'" ArrayList migratedGridsNames = [] // LEAVE EMPTY TO MIGRATE ALL //////////////////////////////////////////// //Get relevant classes and util objects PluginAccessor pluginAccessor = ComponentAccessor.getPluginAccessor(); CustomFieldManager customFieldManager = ComponentAccessor.getComponent(CustomFieldManager) Class apiServiceClass = pluginAccessor.getClassLoader().findClass("com.idalko.tgng.jira.server.api.GridService") Class dataManagerClass = pluginAccessor.getClassLoader().findClass("com.idalko.jira.plugins.igrid.api.data.TGEGridTableDataManager") Class tgeConfigManagerClass = pluginAccessor.getClassLoader().findClass("com.idalko.jira.plugins.igrid.api.config.grid.TGEGridConfigManager") def gridService = ComponentAccessor.getOSGiComponentInstanceOfType(apiServiceClass) def tgeGridDataManager = ComponentAccessor.getOSGiComponentInstanceOfType(dataManagerClass); // find TGE custom fields def tgeConfigManager = ComponentAccessor.getOSGiComponentInstanceOfType(tgeConfigManagerClass); List<Long> tgeCustomFieldIds = tgeConfigManager.getGridCustomFieldIds(); // get current user ApplicationUser user = Users.getLoggedInUser(); User tgeUser = user instanceof ApplicationUser ? ((ApplicationUser) user).getDirectoryUser() : (User) user; //Build the TGE to TGNG correspondance list def gridCorrespondence = tgeCustomFieldIds.collectEntries() {[(it) : customFieldManager.getCustomFieldObject(it).name] } gridCorrespondence = gridCorrespondence.findAll {migratedGridsNames.size == 0 || migratedGridsNames.contains(it.getValue())} StringBuilder responses = new StringBuilder() Issues.search(jqlQuery).each{issue -> for (grid : gridCorrespondence) { try{ String issueKey = issue.getKey() Long issueId = issue.getId() Long tgeCustomFieldId = grid.getKey() CustomField tgngCustomField = customFieldManager.getCustomFieldObjectsByName(grid.getValue()).get(0) Long tgngCustomFieldId = tgngCustomField.getIdAsLong() def tgngfieldData = gridService.readFieldData(issueId, tgngCustomFieldId, user, null) ArrayList tgngRows = tgngfieldData.getRows() def tgeFieldData = tgeGridDataManager.readGridData(issueId, tgeCustomFieldId, null, null, 0, 10, tgeUser); ArrayList tgeRows = tgeFieldData.getValues() if(tgeRows.size < 1 || tgngRows.size > 0){ log.warn("Issue ID" + issueId + " TGE Field: " + tgeCustomFieldId + " Skipping due to no data or TGNG rows present") continue } def tgngObject = tgeRows.collect {row -> row.findAll {!["issueId","modified","id"].contains(it.key)} //Uncomment this to filter out all "O" default list values .findAll {it.value != null && (!it.value instanceof Map || it.value.value != "O")} .collectEntries {key,value -> value instanceof Map ? [(key):value.value] : [(key):value]} .findAll {it.value != null} } gridService.addRows(issueId, tgngCustomFieldId, user, tgngObject) }catch(Exception e){ responses.append(e.getMessage()) } } } return responses


Before you run the script, please make sure that:

  • All of the variables at the top of the script are filled with appropriate values. We recommend starting with a single-issue JQL query for testing purposes

  • All of the newly created Grid’s columns are editable (you can revert them to read-only after the migration)

  • The user account from which you are running the script can view and edit all of the issues that are being migrated. For situations where this is impossible, consider replacing the part of the script that gets TGE data with an appropriate SQL query.

 

Please don’t hesitate to reach out to our support team if you face any issues!