Hi,
Earlier version of confluence we run the report for different macro usage. Right now we are using confluence version 5.1.3, how to get the same report.
as an examaple we using run the query like below . Please suggest. it really and urgent requirement.
SELECT b.BODYCONTENTID, b.BODY, b.CONTENTID, c.TITLE , c.VERSION, c.CONTENTTYPE, c.SPACEID, sp.Spacename, sp.SPACEKEY FROM BODYCONTENT AS b INNER JOIN [CONTENT] AS c ON b.CONTENTID = c.CONTENTID INNER JOIN SPACES SP ON SP.SPACEID=c.SPACEID WHERE (b.BODY LIKE '%{macroname%')
Thanks'
Rinku
The problem is the b.BODY LIKE
'%{macroname%'. You need to specify the new storage format for macros. It should look more like this.
SELECT b.BODYCONTENTID, b.BODY, b.CONTENTID, c.TITLE, c.VERSION, c.CONTENTTYPE, c.SPACEID, sp.Spacename, sp.SPACEKEY FROM BODYCONTENT AS b INNER JOIN [CONTENT] AS c ON b.CONTENTID = c.CONTENTID INNER JOIN SPACES SP ON SP.SPACEID=c.SPACEID WHERE (b.BODY LIKE '%<ac:structured-macro ac:name="macroname">%')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are on a newer version than 5.1.3 then you could use the user macro that I created at the below address. It is better than the above query. It requires at least Confluence 5.5. http://iamdav.in/2015/01/06/confluence-macro-usage-report/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rinku,
As far as I know, this query shows all pages that uses this macro. Unfortunately confluence doesn't have a bundled functionality to show the macros.
The query that you listed will work to show the pages that uses the macros.
Cheers,
Rodrigo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.