The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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%';

TAGS
AUG Leaders

Atlassian Community Events