How to obtain a list of all pages and spaces integrated with JIRA
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Scenario
For auditing purposes, you may wish to obtain a list of pages and spaces that are integrated with JIRA.
Pages can be integrated with JIRA in the following ways:
Using the JIRA Issues Macro
Using the JIRA Chart Macro
Using a Gadget to display information from JIRA
Additionally, spaces can be linked to JIRA projects.
Obtaining the list of pages integrated with JIRA
Execute the following SQL:
1
2
3
4
5
6
7
8
9
10
SELECT s.SPACENAME, s.SPACEKEY, c.TITLE
FROM SPACES s
JOIN CONTENT c ON c.SPACEID = s.SPACEID
JOIN BODYCONTENT b ON b.CONTENTID = c.CONTENTID
WHERE (b.BODY LIKE '%ac:name="jira"%'
OR b.BODY LIKE '%ac:name="jirachart"%'
OR b.BODY LIKE '%ac:name="gadget"%')
AND c.PREVVER IS NULL
AND s.SPACETYPE = 'global'
ORDER BY SPACEKEY, TITLE
Notes
This SQL will not include personal spaces. Remove
AND s.SPACETYPE = 'global'
from theWHERE
clause to include personal spacesGadgets may be from other sources, and may not necessarily point to a JIRA instance. Remove
OR b.BODY LIKE '%ac:name="gadget"%'
if you'd like to exclude gadgets.
Obtain a list of Spaces integrated with JIRA
First, we must determine the active application link IDs, and determine which spaces are linked to JIRA projects. Execute the following SQL against your database:
1
SELECT * FROM bandana WHERE bandanakey = 'applinks.global.application.ids';
This will return an XML value, with individual IDs being set as <string> elements - for example:
1
2
3
4
5
<list>
<string>b3119108-6864-39cb-85f5-20fe363cdf6e</string>
<string>144880e9-a353-312f-9412-ed028e8166fa</string>
<string>ee7d92ec-35e8-372f-90df-e9657f277c84</string>
</list>
Let's use those to find spaces which are linked to JIRA at least one JIRA project:
1
2
3
4
5
6
7
8
9
10
11
SELECT
*
FROM
bandana
WHERE
bandanakey LIKE '%applinks.local%'
AND BANDANAVALUE LIKE '%jira%'
AND (
BANDANAVALUE LIKE '%b3119108-6864-39cb-85f5-20fe363cdf6e%'
OR BANDANAVALUE LIKE '%144880e9-a353-312f-9412-ed028e8166fa%'
OR BANDANAVALUE LIKE '%ee7d92ec-35e8-372f-90df-e9657f277c84%' );
Understanding the ouptut
This query will return something like the following:
BANDANAID | BANDANACONTEXT | BANDANAKEY | BANDANAVALUE |
---|---|---|---|
|
|
|
|
Notes:
The
BANDANAKEY
contains the space key of the linked space, in this caseMYSPACEKEY
The space is linked to a project in JIRA named
MY PROJECT NAME
The space is linked to a project in JIRA with a project key of
MYPROJECTKEY
To obtain information about the application link used for a given space, use it's value as a part of the BANDANAKEY
. For the example above:
1
SELECT * FROM bandana WHERE bandanakey LIKE 'applinks.admin.ee7d92ec-35e8-372f-90df-e9657f277c84%';
The following information will be returned (among other fields used)
The application type (such as JIRA)
The name of the application link
The display URL used
The application URL used (listed as the RPC URL)
Was this helpful?