Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The below article helps you to get the usage information the run macros in the confluence page>

Instructions

The below steps help you to get the usage information of the app from the UI.

...

This article explains how to get a list of Confluence pages and their respective spaces where the Run Self-Service Reports for Confluence app is used.

Instructions

Usage information from the Macro Usage option in the Confluence Administration section:

Navigate to Cog wheel > General configuration > Administration > Macro Usage:
Image Added

Image Added

You can see all the macro usage information like the number of pages (

...

link redirecting respective pages) that are using the app

...

Follow the below steps to get the usage information from the database using the SQL queryin the Macro Usage section as shown:Image Added

Usage information using SQL queries:

As the Run Self-Service Reports for Confluence is having two  has three macros, you must execute the below two queries query for each macro to get the macro-level usage information. If the query returns any records, the output includes the Title of the page and SpaceID of the relevant pages.

  • For the Run with a user form and

...

  • parameters (Run

...

  • ) macro, execute the following query:

    Code Block
    themeMidnight
    Select CONTENT.Title, CONTENT.SpaceID from CONTENT, BODYCONTENT 
    WHERE PREVVER IS NULL AND (CONTENT.CONTENTTYPE = 'PAGE' OR CONTENT.CONTENTTYPE = 'BLOGPOST')
     AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID
     AND (BODYCONTENT.BODY like '%<ac:structured-macro ac:name="run"%');


  • For the Run with a user from (Run-now

...

  • ) macro, execute the following query:

    Code Block
    themeMidnight
    Select CONTENT.Title, CONTENT.SpaceID from CONTENT, BODYCONTENT 
    WHERE PREVVER IS NULL AND (CONTENT.CONTENTTYPE = 'PAGE' OR CONTENT.CONTENTTYPE = 'BLOGPOST')
     AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID
     AND (BODYCONTENT.BODY like '%<ac:structured-macro ac:name="run-now"%');


  • For the Hide content macro, execute the following query:

    Code Block
    themeMidnight
    Select CONTENT.Title, CONTENT.SpaceID from CONTENT, BODYCONTENT 
    WHERE PREVVER IS NULL AND (CONTENT.CONTENTTYPE = 'PAGE' OR CONTENT.CONTENTTYPE = 'BLOGPOST')
     AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID
     AND (BODYCONTENT.BODY like '%<ac:structured-macro ac:name="hide"%');


If the query returns any records, it indicates that the Run Self-Service Reports for Confluence app is being used. Any of the above query gives a result similar to:

Image Added

Info

It is recommended to: 

  • Test the above queries in a test environment. The time taken to get the results is based on the number of pages where the macro has been used.
  • Run the query in the off-business hours to reduce any impact caused due to the run time of the query.