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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

495 views 19 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