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

This widget could not be displayed.

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 Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

229 views 3 0
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