Find all pages where 'JIRA Issue' macros is used

Sergey Shmarkatyuk
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.
February 3, 2013

My JIRA-Confluence integration didn't work properly, so I decided to recreate application links both in JIRA and Confluence. But it turned out that links to JIRA issues (inserted using 'JIRA Issue' macros) on all Confluence pages have become broken because it uses old application link to JIRA. I would like to update JIRA issue links by replacing it manually. In order to do this, I need to find all pages containing 'JIRA Issue' macros. Any ideas about how could I do that?

1 answer

1 accepted

1 vote
Answer accepted
MatthewC
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.
February 3, 2013

You can do it using a SQL query. Taken from the Team Calendars documentation and modified to use jiraissues

SELECT  CONTENT.SPACEID, SPACES.spacekey, SPACES.spacename, CONTENT.CONTENTID, CONTENT.title, CONTENT.LASTMODDATE
FROM    CONTENT, BODYCONTENT, SPACES
WHERE   PREVVER IS NULL AND
    (CONTENTTYPE = 'PAGE' OR CONTENTTYPE = 'BLOGPOST')
    AND CONTENT.CONTENTID = BODYCONTENT.CONTENTID
    AND SPACES.spaceid=CONTENT.spaceid
    AND BODYCONTENT.BODY like '%{jiraissues%'
    ORDER BY CONTENT.LASTMODDATE DESC

MatthewC
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.
February 3, 2013
MatthewC
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.
February 3, 2013
Sergey Shmarkatyuk
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.
February 3, 2013

Thanks a lot!

As long as I use Confluence 4.2, I needed to replace '%{jiraissues% with <ac:macro ac:name="jira">

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events