Finding every filter which name starts with a given prefix

micsanchez October 23, 2017

Hello,

we intensively use filters in the frame  of our projects.

Filter names match a naming convention.

We want to create a confluence page listing every filter which name starts with a certain prefix. We don't want to manually manage this page.

 

An idea would be to create a JQL listing all filters. But filters return only issues and does not return a filter list.

Have you got a workaround for such a JQL:

filter ~MY-PREFIX

and that would return a list of filters.

A plugin or any other alternative would be very appreciated.

 

Thanks a lot !

1 answer

0 votes
Lenard Lee
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 14, 2017

Hi Michael,

Allow me to offer my 2 cents. For your information, filters are saved in JIRA's database in the "searchrequest" table.

Perhaps you could try querying the table directly to return a list of filters fitting your search conditions.

An example would be like the picture below:

image.png

Hope this helps in some ways!

Regards,
Lenard

micsanchez November 14, 2017

Thank you Leonard!

Since you are tagged as Atlassian team, I assume there is no better solution than the one you propose, at least in the current newest JIRA version.

So I am going to ask our JIRA administrator whether they allow querying the searchrequest table, perhaps using a specific interface such as a read only web service or something else.

 

For the moment, my current alternative, was not to use JIRA filters. Instead I use Confluence pages with a specific name, including the JIRA macro. The JIRA macro uses a JQL and does not reference a filter.

And a main Confluence page contains links to the pages containing the JQL.

So I meet my initial requirement, by using page+JIRA macro, instead of filters.

It's a shame to do without filters, and I would prefer to get rid of numerous Confluence pages, but this is life.... And it is perhaps easier for end users. Also another filter trap: we can modify them on the JIRA side without knowing that they are used in the Confluence JIRA / Filter macro. So if we delete or modify them in JIRA, it can affect several Confluence pages without our knowledge.
Hence my initial desire to list a set of filters, rather than filter filter links.
My solution with Confluence pages containing JQL avoids this problem, but leads to a multiplication of pages.

Lenard Lee
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 15, 2017

Hi Michael,

I think there should be a better way to do this, but I'm unable to come up with any other ideas.

There could be some plugins or scripts our there that could achieve this.

But you are indeed correct. The JQL filters return JIRA issues as results. I mean, as far as I know, you can't use a filter, to return a filter.

Best regards,
Lenard

Suggest an answer

Log in or Sign up to answer