# Ticket #7729 (closed enhancement: fixed)

Opened 3 years ago

## Add an "hide_always" option to Hide Rule

Reported by: Assigned to: robguttman robguttman high DynamicFieldsPlugin major sue.sml2006@gmail.com 0.11

### Description

This is an enhancement extracted from defect #7561

The current way to always hide a field is:

alwayshidden.show_when_type = invalid_value


This works but is a bit hacky from an interface perspective. Also, there's a feature request to always hide fields in other views such as:

• Always hidden fields are still shown in the custom query view
• Always hidden fields still appear in Trac emails

An "always_hide" option could replace the alwayshidden.show_when_type = invalid_value approach with a cleaner interface and enable the always hiding of fields in other views.

## Change History

### 12/12/10 22:27:47 changed by robguttman

(In [9667]) refs #7729: added "hide_always" option to Hide Rule which also hides field on custom query page

### 12/12/10 22:36:10 changed by robguttman

• cc set to sue.sml2006@gmail.com.
• status changed from new to closed.
• resolution set to fixed.

The dynfields plugin will now hide always-hidden fields in the customer query view (/query). You can also specify a field to always hide using a new rule syntax:

alwayshide.hide_always = True


(The old-style 'hacky' syntax will also still work.)

### 12/12/10 22:56:11 changed by robguttman

Note that I did not yet handle hiding fields in Trac emails - a candidate future enhancement.

### 12/16/10 01:50:14 changed by hasienda

(In [9690]) DynamicFieldsPlugin: Merge changeset [9667] to 0.12 branch, refs #7729.

This removes the unsane "invalid_value" in favor of a clearer "hide_always" option which also hides field on custom query page now. Fixes small errors in post_process_request methode of the DynamicFieldsModule component too and stricter follows PEP8, especially when writing logic 'and'/'or' before a line-break.

_Beware:_ This version is non-functional yet and need more changes, so please stick to previous versions, if you're not developing yourself.

### 06/08/11 23:02:13 changed by sue.sml2006@gmail.com

Customers_impacted field is set to hide_always, and it's not visible in the columns, but is visible in the drop-down menu

### (follow-up: ↓ 6 ) 06/08/11 23:04:41 changed by sue.sml2006@gmail.com

My organization is finally getting around to upgrading trac and plugins. I am attempting to use the hide_always setting, but it's not working for me. In the screenshot attached, customers_impacted is set to hide_always, and is not visible as a column, but is in the drop down. Additionally, the Component field is set to hide_always and it is visible in both places. Not sure what could be wrong, any pointers would be great.

### (in reply to: ↑ 5 ) 06/09/11 21:47:07 changed by robguttman

• status changed from closed to reopened.
• resolution deleted.

My organization is finally getting around to upgrading trac and plugins. I am attempting to use the hide_always setting, but it's not working for me. In the screenshot attached, customers_impacted is set to hide_always, and is not visible as a column, but is in the drop down. Additionally, the Component field is set to hide_always and it is visible in both places. Not sure what could be wrong, any pointers would be great.

Sue, what version of Trac are you using? I believe I see the problem in Trac 0.12.2 which I will now fix.

### 06/09/11 21:57:15 changed by robguttman

(In [10270]) refs #7729: fixed hide_always for Trac 0.12.2

### 06/09/11 21:58:27 changed by robguttman

Sue, if you're using Trac 0.12.2, please try the latest version of the 0.11 branch. (Yes, the 0.11 branch.)

### (follow-up: ↓ 10 ) 06/11/11 00:36:28 changed by sue.sml2006@gmail.com

I'm not quite sure how to upgrade my plugins. this has always been a bit of a mystery to me. I tried updating the rules.js that looks like the only file that changed, but maybe I'm not doing it right. I'm on vacation until 6/27. I'll try it again when i get back. any pointers on plugin upgrading would be excellent! i haven't found good documentation on it anywhere.

### (in reply to: ↑ 9 ) 06/11/11 20:52:18 changed by hasienda

I'm not quite sure how to upgrade my plugins. this has always been a bit of a mystery to me.

There're certainly others around on the web, but edgewall.org is still the reference, so you could read about Installing a Trac Plugin in the Trac wiki.

### 06/13/11 21:41:09 changed by robguttman

Sue, Steffen (hasienda) provides good general advice above. One specific tip is that you may sometimes need to manually remove the older version of the plugin from the site-packages or dist-packages dir. A sample command to help find the existing egg/dir location:

% sudo find / -name TracDynamicFields*


Then rm -rf the old found dir above before installing the new one (e.g., sudo python setup.py install as one way to install). This isn't always necessary to upgrade but can help the plugin find and use the correct resources.

### 06/14/11 02:16:30 changed by hasienda

To make it even more complete:

Watch out for any egg-cache, where decompressed eggs are stored, typically when not using tracd but a real webserver to power Trac. I've struggled to see the new plugin code working in such a Trac instance some time ago. After removing the egg-cache it was re-generated on next webserver start (or needed to be regenerated before that?), and then it worked as expected.

### 12/03/11 15:52:50 changed by robguttman

• status changed from reopened to closed.
• resolution set to fixed.

This feature was implemented some time ago.