Gadgets usage for Data Center to Cloud migration

Gadgets usage for Data Center to Cloud migration

At the moment automated Cycle Time gadgets migration is not supported.

Once you migrated your Jira data from Data Center 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.

Migration guide

Gadgets usage overview

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.dc.cycle-time%' 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.dc.cycle-time%' GROUP BY pc.gadget_xml;

Result column / value details

Column

Value

Column

Value

gadget_type

Type of gadget:

  • cycle-time (Cycle Time chart)

gadget_count

number of gadgets

If some gadget type is absent in the result, then it is not used in your Jira at all.

Gadgets usage per dashboard

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.dc.cycle-time%' 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.dc.cycle-time%' GROUP BY pp.id, jira.baseurl ORDER BY "gadget_count" DESC;

Result column / value details

Column

Value

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

Gadget details with dashboard info

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.dc.cycle-time%' 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.dc.cycle-time%' ORDER BY pp.id;

Result column / value details

Column

Value

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:

  • cycle-time (Cycle Time chart)

gadget_settings

link to gadget settings in JSON format

Data Center to Cloud feature parity

Functionality of Cycle Time Chart for Jira Cloud is 100% the same as for Jira Data Center

Data Center to Cloud migration development roadmap

We don’t have any development plans at the moment.

Support and questions

If you have any questions or need any help, please contact our Support team: