Search confluence for usage of jira-fields in JQL-Queries

mb February 2, 2018

We do use many jira-macros with JQL-Queries in our confluence to build many different reports. For example:

JQL: "type of feature" = "architecture"

 

Now we renamed some in JIRA fields, for example "type of feature" to "category". After renaming the fields many queries doesn't run anymore, so we tried to search for usage of the field in all confluence pages to change the JQL-Queries.

 

But how can we search for pages that use JQL-Queries with the field in question? Or how can we search and replace the fieldnames in alle JQL-Queries in confluence?

1 answer

1 accepted

0 votes
Answer accepted
mb February 2, 2018

I found the solution at https://confluence.atlassian.com/confkb/how-to-find-all-pages-and-spaces-that-use-a-specific-macro-via-sql-747837116.html and modified the query:

For example, if you search for pages, that use a field named "issuecategory" use this query:

SELECT s.SPACEKEY, c.contenttype, c.title, bc.body
FROM confluence.CONTENT as c
JOIN confluence.BODYCONTENT as bc
    ON c.contentID = bc.contentID
JOIN SPACES s
    ON c.spaceid = s.spaceid
WHERE c.prevver IS NULL
    AND lower(bc.body) like '%issuecategory%';

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events