Context
When migrating Elements Connect fields values with JCMA, the migrated value is the one stored in Jira Datacenter Database for that field.
-
For Live fields, this corresponds to the field Key
-
For Snapshot fields, this corresponds to the field template (value displayed on the issue view screen)
Once the migration is over and the field is correctly configured on Jira Cloud, the correct value should be displayed on the work item view screen (on Jira cloud side).
However, if the migrated value correspond to an issue ID on Jira Datacenter, there could be a necessity to “prepare” that field for migration.
Example
For a Connect field on Jira Datacenter, of type Live Text, plugged on Jira JQL Datasource, the field key by default is the issue ID (and this can’t be changed).
When migrating a project with JCMA, issue ID's won’t be preserved (they are generated by Jira when issues are created), so there is no correlation between DC and Cloud issue ID’s.
|
Issue ID on Jira DC |
Issue key on Jira DC |
Value stored in Jira DC database for a Connect field selecting that issue |
|---|---|---|
|
10000 |
MIG-123 |
10000 |
After migration to Cloud:
|
Issue ID on Jira Cloud |
Issue key on Jira DC |
Value migrated into Cloud for the Connect field selecting that issue |
|---|---|---|
|
22000 |
MIG-123 |
10000 |
In this case, the migrated value in the Connect field “10000” correspond to null (or could point to a wrong issue).
The above could be the case for:
-
All fields plugged on Jira JQL datasource
-
Fields plugged to Jira SQL datasource or the Jira REST API, where the field is configured to store the issue ID
Workaround
The idea will be to create a new field that will store the issue key of the selected issue id and use that field during migration
-
For each Connect field storing an issue ID in Jira DC, create an Elements Connect field and configure it as follows:
-
Datasource: Jira SQL Datasource
-
Field type: Live text (or Snapshot Text based on your need)
-
Editor: Read only
-
Single or multi values (based on the original field setup)
-
Query: where
customfield_xxxxxis the original Connect field that stores the issue idSELECT project.pkey||'-'||jiraissue.issuenum FROM jiraissue, project WHERE project.id = jiraissue.project AND jiraissue.id = $issue.customfield_xxxxx -
Field Key:
{0} -
Field template
{0}
-
-
Save the field and add it at least to one screen on all projects where the original field is used
-
After the field got created, confirm it works correctly by setting it manually on any issue (where the original Connect field exists)
-
Next step will be to populate the new field(s) with values on existing issues (where original Connect fields storing issue ID’s are set) by following one of the methods discussed in this page.
-
Before migrating to Cloud:
-
Remove original Connect fields from all project screens, that will result in not migrating them to Cloud
-
Make sure all new fields are added to at least one screen per project
-