How to write a database query to find the total number of Dataplane report gadgets that are added to Jira Dashboards
This article provides the database query to find the total number of Dataplane report gadgets that are added to Jira Dashboards.
 Instructions
Â
Login to the Jira instance database. If one requires information pertaining to the database, it is recommended to consult with the database administrator for guidance.
For a count of Dataplane report gadgets added to Jira dashboards, run the following Jira database query.
SELECT pp.username AS dashboard_owner, pp.pagename AS dashboard, pp.id AS dashboard_id, COUNT(pc.portalpage) AS dataplane_gadgets FROM portletconfiguration pc LEFT JOIN portalpage pp ON pc.portalpage = pp.id WHERE pc.gadget_xml LIKE '%dataplane%' GROUP BY dashboard_owner, dashboard, dashboard_id ORDER BY dashboard_owner, dataplane_gadgets DESC;
Example output :
dashboard_owner | dashboard | dashboard_id | dataplane_gadgets ------------------+--------------------+--------------+------------------- u1234 | Support Team | 12371 | 1 u7241 | Test | 13070 | 6 u7241 | Development | 12870 | 6 u7241 | Main Dashboard | 13170 | 2 u5817 | Test | 13270 | 2 u9112 | Development | 12271 | 9 u9112 | External Support | 12470 | 5 u9112 | Sales | 12273 | 3 u9112 | Support | 12270 | 3 u9112 | Personal | 12471 | 2 u9112 | Beta | 12272 | 2 (11 rows)
Example screenshot from the DbVisualizer tool:
Note: This query does not capture how often the reports are run, which is dependent on how widely the dashboards are shared, favorited and visited by Jira user
Please check the syntax, depending on the database being used.
Â