Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

In a SQL query, how do I get the saved columns of a saved filter?

Betsy Walker {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2018

I am trying to do impact analysis of a Jira instance to see where (and whether) a user-installed add-on's custom fields are referenced by filters.  I know the searchrequest table contains the underlying JQL of the filter, and thus can see if a field is referenced in the JQL itself, but what tables do I traverse to see if a custom field is referenced in the columns returned by a saved filter?


Thanks!

1 answer

1 accepted

6 votes
Answer accepted
Betsy Walker {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2018

Figured it out:

SELECT SR.filtername, CLI.fieldidentifier 
FROM columnlayoutitem CLI
INNER JOIN columnlayout CL ON CLI.columnlayout = CL.id
INNER JOIN searchrequest SR ON CL.searchrequest = SR.id
WHERE CLI.fieldidentifier IN ('customfield_10880','customfield_11280','customfield_10680');

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events