At the moment Jira Server to Cloud Migration tool does not support dashboards and third-party gadgets migration described in this feature request https://jira.atlassian.com/browse/MIG-164. That’s why we have equipped you with the following tips to help you with the manual migration of gadget configurations.
Once you migrated your Jira data from Server/DC to Cloud, you need to manually recreate gadgets and their configurations. First, however, you need to know what gadgets were added to which dashboards.
You can fetch that information using SQL queries run in your Jira database.
SQL snippets have been tested in Postgres and MySQL databases but should work in all other Jira-supported databases either as is or with minimal modifications. |
This SQL query produces the details of how many gadgets are in your Jira grouped by gadget type.
Postgres
SELECT substring(pc.gadget_xml, 'gadget/gadgets/(.*).xml') as "gadget_type", count(pc.gadget_xml) as "gadget_count" FROM portletconfiguration pc, portalpage pp WHERE pc.portalpage = pp.id AND pc.gadget_xml LIKE '%net.brokenbuild.velocity-chart%' GROUP BY pc.gadget_xml; |
MySQL
SELECT trim(trailing '.xml' from substr(pc.gadget_xml, length(substring_index(pc.gadget_xml, '/', 6))+2)) as "gadget_type", count(pc.gadget_xml) as "gadget_count" FROM portletconfiguration pc, portalpage pp WHERE pc.portalpage = pp.id AND pc.gadget_xml LIKE '%net.brokenbuild.velocity-chart%' GROUP BY pc.gadget_xml; |
Column | Value |
---|---|
gadget_type | Type of gadget:
|
gadget_count | number of gadgets |
If some gadget type is absent in the result, then it is not used in your Jira at all.
This SQL query produces the details of dashboards and the number of gadgets added to them:
Postgres
SELECT jira.baseurl || '/secure/Dashboard.jspa?selectPageId=' || pp.id as "dashboard_url", pp.pagename as "dashboard_name", pp.username as "dashboard_owner", count(pc.id) as "gadget_count" FROM portletconfiguration pc, portalpage pp, (select propertyvalue "baseurl" from propertyentry PE join propertystring PS on PE.id=PS.id where PE.property_key = 'jira.baseurl') "jira" WHERE pc.portalpage = pp.id AND pc.gadget_xml LIKE '%net.brokenbuild.velocity-chart%' GROUP BY pp.id, jira.baseurl ORDER BY "gadget_count" DESC; |
MySQL
SELECT concat(jira.baseurl, '/secure/Dashboard.jspa?selectPageId=', pp.id) as "dashboard_url", pp.pagename as "dashboard_name", pp.username as "dashboard_owner", count(pc.id) as "gadget_count" FROM portletconfiguration pc, portalpage pp, (select propertyvalue "baseurl" from propertyentry PE join propertystring PS on PE.id=PS.id where PE.property_key = 'jira.baseurl') as jira WHERE pc.portalpage = pp.id AND pc.gadget_xml LIKE '%net.brokenbuild.velocity-chart%' GROUP BY pp.id, jira.baseurl ORDER BY "gadget_count" DESC; |
Column | Value |
---|---|
dashboard_url | dashboard url that can be used for quick access to dashboard in the browser |
dashboard_name | dashboard name |
dashboard_owner | dashboard owner (Jira user name) |
gadget_count | number of gadgets on the dashboard |
This SQL query produces details about gadgets, gadget settings, dashboard of the gadget:
Postgres
SELECT jira.baseurl || '/secure/Dashboard.jspa?selectPageId=' || pp.id as "dashboard_url", pp.pagename as "dashboard_name", pp.username as"dashboard_owner", pc.id as "gadget_id", substring(pc.gadget_xml, 'gadget/gadgets/(.*).xml') as "gadget_type", jira.baseurl || '/rest/dashboards/1.0/' || pp.id || '/gadget/' || pc.id || '/prefs.json' as "gadget_settings" FROM portletconfiguration pc, portalpage pp, (select propertyvalue "baseurl" from propertyentry PE join propertystring PS on PE.id=PS.id where PE.property_key = 'jira.baseurl') "jira" WHERE pc.portalpage = pp.id AND pc.gadget_xml LIKE '%net.brokenbuild.velocity-chart%' ORDER BY pp.id; |
MySQL
SELECT concat(jira.baseurl, '/secure/Dashboard.jspa?selectPageId=', pp.id) as "dashboard_url", pp.pagename as "dashboard_name", pp.username as"dashboard_owner", pc.id as "gadget_id", trim(trailing '.xml' from substr(pc.gadget_xml, length(substring_index(pc.gadget_xml, '/', 6))+2)) as "gadget_type", concat(jira.baseurl, '/rest/dashboards/1.0/', pp.id, '/gadget/', pc.id, '/prefs.json') as "gadget_settings" FROM portletconfiguration pc, portalpage pp, (select propertyvalue "baseurl" from propertyentry PE join propertystring PS on PE.id=PS.id where PE.property_key = 'jira.baseurl') as jira WHERE pc.portalpage = pp.id AND pc.gadget_xml LIKE '%net.brokenbuild.velocity-chart%' ORDER BY pp.id; |
Column | Value |
---|---|
dashboard_url | dashboard url that can be used for quick access to dashboard in the browser |
dashboard_name | dashboard name |
dashboard_owner | dashboard owner (Jira user name) |
gadget_id | gadget ID |
gadget_type | Type of gadget:
|
gadget_settings | link to gadget settings in JSON format |
Use URL from gadget_settings column to get gadget settings in the browser:
Functionality of Velocity Chart for Jira Cloud is 100% the same as for Jira Server/DC |
We don’t have any development plans at the moment.
If you have any questions or need any help, please contact our Support team:
email - support@brokenbuild.net
Service Desk - https://brokenbuild.atlassian.net/servicedesk/customer/portal/10