How to edit multiple filters to change a JQL value?

fbeck_br May 18, 2015

Hello,

Suppose I have a user who has 150 filters. Some os these filters (I do not know how many) are using a custom field "Address", but we need to change the CF string to "Local Address".

We know that some user's filters will became broken because it use string instead of cf[12345]

Is there some addon to change multiple filters at once ?

Should be possible to change these filters in Database ?

1 answer

1 accepted

2 votes
Answer accepted
Jaime S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2015

Hi, Flavio.

If I'm not mistaken, database manipulation is the only way.

You can change the 'searchrequest' table for that. Using some operation for replacing is useful. For example, if you're using postgres, something like this should work (check it before using):

update searchrequest set reqcontent = replace(reqcontent, 'Address', 'Local Address');

Or even better:

update searchrequest set reqcontent = replace(reqcontent, 'Address', 'cf[12345]');

To avoid having to do this in the future. Other databases will probably use different 'replace' operations.

Be careful though!

  1. If you have other custom fields with 'Address' in their names, this may break filters using them
  2. Back up your database first! You may break something
  3. Test it first. I didn't test those updated, not sure if I didn't make a mistake. Restore your backup somewhere else and test it there

I hope this was helpful.

Kind regards,
Jaime Kirch da Silveira
Atlassian Cloud Support

fbeck_br May 20, 2015

Great! thank you

SRBR SE June 8, 2015

Hi, Jaime. i made some updates in 'searchrequest' table and the changes are not working in my filters. The customfield was updated in Database but when i open my saved filter, the old option are still there. I tried restart JIRA but did not work Is there other step or suggestion to execute? Thank you

Joost Damen April 4, 2016

Any ideas on this? @flavio beck were you able to solve this? i'm running into the same issue. Made changes in the Database (searchrequest table, reqcontent field) nothing changes in my filters in JIRA... 

Thanks!

Flavio Beck April 5, 2016

Hi,

Yes, it do worked for me, but for some reason the searchresults may have some cache in mamory, and after change table entries it is not applied on JIRA application.

You need to restart.

Or, In my case I planned to do it in a maintenance window, so I only changed the database, but do not restart.

Mysteriously, in the next day morning (without any restart) the changes in DB was applied.

Maybe JIRA had cleared cache ..

 

BR

Flavio

 

Joost Damen April 5, 2016

Hi,

Thanks for your reply.

For me it worked after a stop / start of JIRA, the new JQL was active in the filters.

I needed to do a restart, an reindex did not work, so no clue what happend overnight in your case, maybe so cache or indexfiles that were cleared.

Gr, Joost

Xue Gu September 21, 2017

Is there any way to avoid the restart?

 

Thanks

-Maggie

Suggest an answer

Log in or Sign up to answer