Query for gadgets used on dashboards

Matej Štrba
Contributor
September 28, 2022

Hello community,

is there any DB query how to pull all used gadgets on all dashboards ? We need to find where and which native/3rd party dashboard gadgets are used.

2 answers

1 accepted

2 votes
Answer accepted
Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2022

You could probably build something from this (postgres):

SELECT pp.pagename, pc.gadget_xml, count(pc.gadget_xml) FROM portalpage pp JOIN portletconfiguration pc ON pp.id = pc.portalpage WHERE pc.gadget_xml NOT LIKE '%pyxis.greenhopper%' GROUP BY pp.pagename, pc.gadget_xml;

where:

portalpage = dashboard

portletconfiguration = dashboard gadget

 

I also chose to use WHERE pc.gadget_xml NOT LIKE '%term%' because I wanted to filter out any out of box gadgets, e.g. jira agile (greenhopper), or any com.atlassian.blabla things, because without the exclusion you will probably just get a ton of native gadgets but nothing 3rd party on first sight. So I think if you take some time to exclude those you're not interested in, you should then get a decent overview of which dashboards which gadgets are used on.

Matej Štrba
Contributor
October 11, 2022

Thank you Radek,

this is exactly what I was looking for.

Best,

Matej

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 28, 2022

Hi @Matej Štrba 

Maybe use REST API for this: https://developer.atlassian.com/server/jira/platform/dashboard-item-module/

Let me know if that helps.

Suggest an answer

Log in or Sign up to answer