Find all pages where 'JIRA Issue' macros is used

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

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

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
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...

380 views 21 10
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