Hi all, based on the CondFieldsPlugin http://trac-hacks.org/wiki/CondFieldsPlugin and the patch "blackmagic-conditionalfields.patch" in http://trac-hacks.org/ticket/2486 which did not match with newer releases of Trac 0.11, I created a new ticket:
http://trac-hacks.org/wiki/CondFieldsGenshiPlugin With the help of this Trac plugin you can hide or show fields when creating or viewing a ticket, depending on the ticket type. Only the presentation changes, not the contents of the ticket. This plugin is completely based on Genshi now instead of using Javascript. Moreover, you can select whether selected fields are hidden or shown by default. It runs stable under Trac 0.12 (Trac 0.11 was not tested yet but it should run there - either I will test it soon, or somebody from this group). A bugfix was done for the "type" field: When the ticket type is given as an URL parameter only: .../newticket?type=task and the ticket type field is disabled, this plugin works nevertheless. The type field label is extended by "(Fixed)" in this case now. *Comparison with DynamicFieldsPlugin* The DynamicFieldsPlugin (http://trac-hacks.org/wiki/ DynamicFieldsPlugin) has similar and more powerful features than CondFieldsGenshi but it can change the field contents: When the user changes the type and some fields vanish, the values in these fields are lost and will not appear again even if the former type is restored. A rule "(fieldname).clear_on_hide = false" avoids this but then the fields are shown anyway. There are other problems reported about the DynamicFieldsPlugin: - Very slow performance for a larger number of custom fields are obviously caused by javascript in the DynamicFieldsPlugin. CondFieldsGenshi is based on Genshi and thus does filtering on the server side with higher performance. - Problems when sorting the fields as reported in [4] are also due to some bug in the javascript and should not happen for CondFieldsGenshi. *Possible Extensions* It should be easy to display or even change fields dependend on other parameters but I leave this up to user's wishes :-) Reinhard Wobst -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
