Find spaces in confluence that use specific plugin (Confluence 5.1)

Hi,

Can anyone help with the below query to retrieve the list of spaces/pages in Confluence that uses community forum macro.

we tried using following keywords(community, forum, forum:) but nothing helped us.

Select CONTENT.CONTENTID, Title, SpaceID, CREATOR, LASTMODDATE
from CONTENT, BODYCONTENT
WHERE
PREVVER IS NULL
AND (CONTENTTYPE = 'PAGE') 
AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID 
AND CONTENT_STATUS = 'current'
AND (BODY like '%{macroName%')

Thank you.

3 answers

1 accepted

Hi Karthik

This is what I did:

Select CONTENT.CONTENTID, Title, SpaceID, CREATOR, LASTMODDATE
from CONTENT, BODYCONTENT
WHERE
PREVVER IS NULL
AND (CONTENTTYPE = 'PAGE') 
AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID 
AND CONTENT_STATUS = 'current'
AND ((BODY like '%ac:name=\”communities\”%') OR (body LIKE '%ac:name=\"user-info\"%'));

Basically you'll have to list all Community Bubbles macros. The above query will return just pages with {communities} OR {user-info}, so you'll have to extend this OR to include all macros listed on that page.

Best regards,

Felipe Alencastro

Hi Karthik,

They're not stored as {macroName} on the database. This is what they look like on storage format:

<ac:structured-macro ac:name"macroName">

Please let me know if the below query works for you:

Select CONTENT.CONTENTID, Title, SpaceID, CREATOR, LASTMODDATE
from CONTENT, BODYCONTENT
WHERE
PREVVER IS NULL
AND (CONTENTTYPE = 'PAGE') 
AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID 
AND CONTENT_STATUS = 'current'
AND (BODY like '%ac:name=\”macroName\”%');

Kind Regards,

Felipe Alencastro

Hi Felipe,

Thanks for taking time to respond.

We have already tried this way but we couldn't make the query work for Community bubbles macro, maybe because of 25 sub macro that comes along with this macro.

Could you please let us know the storage format of this macro or any suggestions on how to query this !!

Regards,

Karthik

Hi Felipe,

Thanks for taking time to respond.

We have already tried this way, but we couldn't make the query work for Community Bubbles Macro maybe because of 25 sub-macros included with this macro.

Could you please let us know the storage format of Community bubbles Macro or any suggestions on how to query !!

Regards,

Hi guys, Im using Python to perform the above query and Im finding its taking a very long time to return any results. Is this to be expected?

Yes, this is expected. Mostly depends on the no. of spaces it needs to go through.

Yes, this is expected. Mostly depends on the no. of spaces it needs to go through.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,916 views 27 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you