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

Is there a way to change the content of a filter with a script ?

Laurent Bierge
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.
February 8, 2018

Hi,

I've done a script that allow me to replace an issue type by an other one in all my Jira.

It works, but it broke all the filter of the previous type.

Is there a way to change the content of all filter.

Like:

def filterMan = ComponentAccessor.filterManager()

def allFilters = filterMan.getAllFilters()

def jqlRequest

allFilters.each{

if ("issue Type" in it.getJqlRequest()){

jqlRequest = it.jqlRequest()

jqlRequest.replace("issue Type", "new issue Type")

it.setJqlRequest(jqlRequest)

}

}

My main issue consist in getting all the jql request of all the filter.

 

Regards,

Laurent

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Mamta Verma October 11, 2018

Hi Laurent,

We also have a similar requirement for adding custom filters using script. Did you find any solution to it?

Thanks In Advance

Laurent Bierge
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.
October 11, 2018

Hi Mamta,

Nop, sorry :/

Regards,

Laurent

TAGS
AUG Leaders

Atlassian Community Events