Hiding custom fields in "View Issuses" filter

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Phyxas
Posts: 3
Joined: 10 Oct 2006, 06:25

Hiding custom fields in "View Issuses" filter

Post by Phyxas »

Hi,

I used the "Manage -> Manage Custom Fields" to add a String to bug reports.

Now can the filter on the "View Issuses" be set over this String.
I have searched all over the configuration possibilities for a "hide in filter" option, but without success.

"Display Only On Advanced Page" is no acceptable alternative, because it should be visible at normally bug report.

The question now is, is a "hide in filter"-option not available or do I need glasses ;)

I'm using Mantis 1.0.5

Thanks for you help in advance
clandriot
Posts: 8
Joined: 21 Jun 2006, 16:29
Location: Annecy, France

Post by clandriot »

Hello !
Your problem is weird, since I have no problem xith this functionality (also Mantis 1.0.5).

I have unchecked all options in my custom field (so, also the View in Advanced page), and I can see my custom field in the filter. It is placed at the the end of all other criterias.

I have not tested properties like the regexp for example. Perhap's there is a problem with one of these ! What are exactly the properties of your custom field ?

Or perhap's, the solution is more simple : have you added your custom field to your project ('Add This Existing Custom Field' in the project properties).
The custom field is also not inherited by sub-project ....
Check also this point ...
Phyxas
Posts: 3
Joined: 10 Oct 2006, 06:25

Post by Phyxas »

Maybe my explanation of this problem was not clear enouth.

The custom field is added to the project and it is visible at last item of the filter in "View Issiues", but I want to hide it from there so the user can not filter over this cutsom field!
clandriot
Posts: 8
Joined: 21 Jun 2006, 16:29
Location: Annecy, France

Post by clandriot »

Sorry, it's me that need glasses :oops:

There is a variable in the config file : filter_by_custom_fields.
It is by default to 'ON'. It will hide the custom fields in the filter if it is set to 'OFF', but all your custom fields will be afftected in the same way.

To improve this, you could add your own variable (that will contain an array of custom fileds) and modify the core/filter_api.php to use your variable instead of filter_by_custom_fields ....

That's just a hint, perhap's there is a better solution !
Phyxas
Posts: 3
Joined: 10 Oct 2006, 06:25

Post by Phyxas »

I see: To turn off all custom fields for filtering i have just du modifiy the config-file.
But to set which of many custom fields are used to filter i have to modify the filter_api.php.

Has anyone done this before? I looked all over the php source until i was completely confused. *not used to php-skripting*
Post Reply