How to find the filters that uses a custom field

I have to find all the filters that uses a custom field. Please help me is there any wat to do this either on database or from JIRA UI

1 answer

you can use this query.

select * from searchrequest s where s.reqcontent like '%yourfieldname%' or s.reqcontent like '%cf[yourcustomfieldid]%';

but there might be in addition filters that are using those filters

Hi Udo .. Thanks Now I am running into need of different help like ... Request your help on this too ..

We are planned to do the following change to one of the field of type 'drop down'.

Example:

Field Name : Projects (Not mandatory field)
Type : Drop down list

  • Renaming the field "Projects" drop-down to "Business".
  • Retiring some values in this field.
  • Renaming some values in the field.
  • Adding some new values to the list.
  • Making this field a required one.

Now I dont have any problem doing these changes. I have to change all the filters that uses this field and it's value. Please help me in doing the below activity.

1. I need to find and modify all the filters to use the field name as "Business" in place of "Projects" after rename.
2. I need to find and change all the filters that uses the value in the field "Projects" that are going to renamed.

first find the id of the field Projects and replace 'ID' with this id in the query below.

select * from searchrequest s where s.reqcontent like '%Projects%' or s.reqcontent like '%cf[ID]%';

for the second part, all filters which are using values which will be renamed are already within the resultset of the first part, since they will have 'Projects' in the filter

Hi Udo,

THanks for your help, just want to confirm from your end that "Does this custom field "Projects" in filter has reference to searchrequest table alone or it is referred in any other table ?"

Hi Prakash,

it has references to other tables as well but only with its ID. So renaming the field will have no other effect beside the one on the filters using this field.

The response above is good for advanced filters which are stored as text, but what about "Basic" filters?

Thanks,

Mike

Hi Mike,

Basic filters are stored in the same way as advanced filters. So it works for them as well.

Cheers,

Udo 

 

Interesting, Thanks, Udo! :-) 

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,209 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot