Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5638 closed enhancement (fixed)

Hide fields when there are no supplied options

Reported by: rjollos Owned by: richard
Priority: normal Component: TracTicketChainedFieldsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


I contacted Richard requesting the enhancement that a field could be hidden when there where no options supplied for that field. Suppose FieldA has several options, one being OptionA1. When OptionA1 is selected, suppose there are no options supplied for FieldB. In that case, FieldB should be hidden. However, when OptionA2 is selected, FieldB is populated with a number of possible values. Another example follows in my email below.

From: Richard Sent: Friday, August 07, 2009 2:42 AM To: Ryan J Ollos Subject: Re: TracTicketChainedFieldsPlugin

On Fri, Aug 7, 2009 at 3:02 PM, Ryan J Ollos wrote:


I was just looking at the plug-in that you recently uploaded. This looks like a nice addition to the Trac functionality.

Quick question: does it have the ability to hide a ticket field when there are no options specified for that field? Or would it be easy to extend to have this feature?

It can't do that currently. It's not very hard to add this feature, I will make it soon.

For instance, suppose I had the following example:


"domain": {

"software": {

"component": {

"acquisition layer": {},

"processing layer": {},

"driver layer": {}



"hardware": {

"component": { }



I'd want the "component" field to be hidden if "hardware" was selected from the "domain" field.

I've been thinking about working on something like that, but if your plug-in could do the trick as is or with a little bit of modification, that would be excellent!


  • Ryan

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by richard

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [6352]. Usage:

  • trac.ini
    hide_empty_fields = true
  • Please note:

if no options for some fields, like "SE" in example, you still need supply the full structure, with empty string as keys.

comment:2 Changed 7 years ago by rjollos

Thanks for adding this! It will be very helpful for my Trac installation.

Add Comment

Modify Ticket

as closed The owner will remain richard.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.