Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What is a fast method to update filters using a custom field that will be removed?

Josh Simnitt
Contributor
May 14, 2019

We have several custom fields that will be removed from Jira, and I would like input on a good method to update these filters. 

It looks like it might be possible to use ScriptRunner to update these fields?  I realize that a user could go to the particular filter him/her self and update the filter using the UI.  

I realize that the data also lives in the REQCONTENT field on a Jira table, but I know that generally it's a bad idea to touch that directly.

1 answer

1 vote
Marc Minten (EVS)
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.
May 15, 2019

Yes, with scriptrunner you can write a script that

  • loops over all (public ?) filters (probably not possible on private filters ?
  • get the filter definition
  • find out whether the custom field is used (finding its name in the fiter definition)
  • take ownership of the filter (the executor of the script needs to have admin rights!)
  • change the filter definition
  • reset the filter ownership

Of course you "can" also do the changes directly in the database, but then you should at least stop Jira, take a full backup, change, restart Jira and validate your changes did not have any side-effect...

Suggest an answer

Log in or Sign up to answer