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: 

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 Champions.
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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

Hi Mamta,

Nop, sorry :/

Regards,

Laurent

TAGS
AUG Leaders

Atlassian Community Events