Hello, I wrote plugin that remove filter/filters of inactive user/users. Thats working very fine. But... The problem is, that user can be inactive, but his filter is used in jira. For example this filter is linked in some project, or shared with another user, or generally used anywhere else! How can I determine where this filter is used (boards, confluence maybe, other)?
Hi Stephen,
I answered a similar post a few weeks ago over in https://community.atlassian.com/t5/Jira-questions/Query-or-ways-to-find-filters-which-linked-with-any-dashboard-or/qaq-p/1064874 that might be helpful here.
Using some SQL in that post, we should at least be able to identify all the Software Boards and Dashboards in Jira that might be using a particular filter in the Jira database.
As for other applications like Confluence, well, that gets a bit more complex to try to track down. To my knowledge, Jira's own database doesn't have a means to track when other applications might be utilizing a filter for say, something like a macro in Confluence. But I think we can use the KB How to find all pages and spaces that use a specific macro via SQL to start to find which pages are using the Jira issue macro in Confluence to start.
This query would have to run on the Confluence SQL database.
SELECT c.contentid, c.contenttype, c.title, s.spacekey, bc.body
FROM CONTENT c
JOIN BODYCONTENT bc
ON c.contentid = bc.contentid
JOIN SPACES s
ON c.spaceid = s.spaceid
WHERE c.prevver IS NULL
AND c.contenttype IN ('PAGE', 'BLOGPOST')
AND bc.body LIKE '%ac:name="jql"%';
Which should be able to at least tell you the space and the name of the pages/blog posts that are using a Jira issue macro that is searching for issues via JQL. However this query by itself isn't specific enough to tell us which are using a specific filter here. Since Confluence can let you specify by the filter name, filter id, or the specific jql syntax, it becomes a lot harder to write one SQL query to find all of these. It might require looking a bit deeper at all the possible structures here to see we can identify these.
I hope this helps.
Andy
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.