Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13214 closed defect (duplicate)

Dynamic fields is hiding all the fields in the ticket summary

Reported by: matthewf@… Owned by: Ryan J Ollos
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

Our trac project has been upgraded to trac and the dynamic fields plugin is now hiding all the fields in the summary (the part when the fields are edited is correctly showing the subset of fields). If any field has the x.show_when_type=y or x.hide_when_type=y specified in the trac.ini file then the field is hidden.

Installation info is listed below. Any help in resolving would be greatly appreciated.

System information
Package Version
Trac 1.0.9
Babel 1.3
CustomFieldAdmin 0.2.6
Docutils 0.12
Genshi 0.7 (with speedups)
mod_python 3.3.1
Pygments 2.1
pysqlite 2.6.0
Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
pytz 2014.10
RPC 1.1.7.dev0
setuptools 20.7.0
SQLite 3.11.0
Subversion 1.9.3 (r1718519)
jQuery 1.7.2
jQuery UI 1.8.21
jQuery Timepicker 1.0.1


Installed plugins
Name Version Location
Bitten 0.6 /usr/lib/python2.7/dist-packages
graphviz.graphviz N/A /usr/lib/python2.7/dist-packages/graphviz/graphviz.pyc
MultipleWorkflowPlugin 1.3.3 /usr/tracprojects/testing/plugins/MultipleWorkflowPlugin-1.3.3-py2.7.egg
TracAccountManager 0.4.3 /usr/lib/python2.7/dist-packages
TracAuthOpenId 0.4.7 /usr/lib/python2.7/dist-packages
TracCustomFieldAdmin 0.2.6 /usr/lib/python2.7/dist-packages
TracDynamicFields 2.2.1.dev0 /usr/tracprojects/testing/plugins/TracDynamicFields-2.2.1.dev0-py2.7.egg
TracHTTPAuth 1.1 /usr/tracprojects/testing/plugins/TracHTTPAuth-1.1-py2.7.egg
TracMasterTickets 3.0.2 /usr/lib/python2.7/dist-packages
TracMercurial 1.0.0.3dev-r0 /usr/lib/python2.7/dist-packages
TracSpamFilter 0.2.1dev-r0 /usr/lib/python2.7/dist-packages
TracSubTicketsPlugin 0.5.3 /usr/tracprojects/testing/plugins/TracSubTicketsPlugin-0.5.3-py2.7.egg
TracVisualization 0.0.1 /usr/tracprojects/testing/plugins/TracVisualization-0.0.1-py2.7.egg
TracWysiwyg 0.12.0.3 /usr/lib/python2.7/dist-packages
TracXMLRPC 1.1.7.dev0 /usr/tracprojects/testing/plugins/TracXMLRPC-1.1.7.dev0-py2.7.egg

Attachments (2)

trac-about.JPG (59.9 KB) - added by anonymous 7 years ago.
trac-ticket.JPG (139.2 KB) - added by anonymous 7 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 7 years ago by Ryan J Ollos

Please provide a minimal sample [ticket-custom] section that reproduces the issue.

comment:2 Changed 7 years ago by anonymous

Thanks for looking. This is a snippet from the ticket-custom section. If the show_when/hide_when lines are commented out then the field is shown, otherwise it is hidden, even if it should be shown (at least when I think it should be shown). If necessary I could probably get you access to the system, which is running Ubuntu 16.04.

[ticket-custom]
cc.show_when_type = test|pr|documentation|devel|project

doc_type = select
doc_type.label = Document type
doc_type.options = |app_note|brochure|integration_db|manual_update|price_list|release_notes
doc_type.order = 90
doc_type.show_when_type = documentation

duration = text
duration.label = Hours spent
duration.order = 70
duration.hide_when_type = eco
Last edited 7 years ago by Ryan J Ollos (previous) (diff)

comment:3 Changed 7 years ago by Ryan J Ollos

Status: newaccepted

comment:4 Changed 7 years ago by Ryan J Ollos

Resolution: worksforme
Status: acceptedclosed

The configuration works fine for me with Trac 1.0.9. Most likely you have a plugin conflict TracTroubleshooting#ChecktheBrowserConsole). You can try disabling all of your plugins, and if it works enable them one-by-one until you find the plugin that breaks the configuration.

Make sure you are running the latest DynamicFieldsPlugin. I bumped the version just now (2.1.0dev -> 2.1.0) and published to pypi:TracDynamicFields.

You are running some very old versions of plugins. I suggest going through all your plugins and upgrading, particularly for MasterTicketsPlugin and SpamFilterPlugin.

Changed 7 years ago by anonymous

Attachment: trac-about.JPG added

Changed 7 years ago by anonymous

Attachment: trac-ticket.JPG added

comment:5 Changed 7 years ago by anonymous

Thanks again for investigating.

Using the Ubuntu 16.04 package system to install Trac gave Trac version 1.0.9, with all the plugins previously listed. I have had another attempt at this, but using Trac 1.2.1 and only the dynamic fields plugins and, surprisingly, I am getting the same behaviour: the description is only showing the reporter and owner fields and the modify ticket section is showing the correct subset of fields.

So this time the install is streamlined to a single plugin with the latest trac. This is the about info:

This is a snapshot of the browser (Chrome) with the developer tools showing the hidden fields:

As far as I can tell this is a minimal configuration, but I'm still seeing the problem. Can you see anything that is obviously wrong?

Last edited 7 years ago by Ryan J Ollos (previous) (diff)

comment:6 Changed 7 years ago by Ryan J Ollos

Is your [ticket-custom] section the same as in comment:2? I think it's probably the issue described in #12575.

comment:7 Changed 7 years ago by anonymous

I have tested with a single custom field, eg:

[ticket-custom]
duration = text
duration.hide_when_type = eco
duration.label = Hours spent

and a single pre-defined field, eg:

[ticket-custom]
cc.show_when_type = test

In both cases it causes the field to always be hidden. #12575 doesn't have much details. Is there anything I can feed back to you to resolve this? Could you point me in the direction to look for the problem (I'm afraid I have basically no experience with Pyhton, Javascript and jQuery, but I'd be happy to have a look and help if possible).

comment:8 Changed 7 years ago by anonymous

Been testing a bit. If clear_on_hide is set to true (the default) the field is always hidden. If clear_on_hide is set to false the field is always shown. This seems to tie in with rule.js:169 onwards. That's as far as I have got.

comment:9 Changed 7 years ago by Ryan J Ollos

Resolution: worksformeduplicate

The plugin interacts poorly with preview and autopreview. I think it's going to take some work to fix this and not sure when I'll have time to work on it.

comment:10 Changed 7 years ago by anonymous

Hi Ryan. It is not in the preview that the fields are being not being shown, but in the ticket ticket description block.

comment:11 Changed 7 years ago by Judy M

I'm having the same issue after a Trac upgrade to 1.0.13 from a much older version. Anything with a show_when_type is not displayed in the read/display portion of the ticket at the top (yellow). OP, if you look back here - did you find a resolution to this?

comment:12 in reply to:  11 Changed 7 years ago by anonymous

Replying to Judy M:

I'm having the same issue after a Trac upgrade to 1.0.13 from a much older version. Anything with a show_when_type is not displayed in the read/display portion of the ticket at the top (yellow). OP, if you look back here - did you find a resolution to this?

Hi. No, I never resolved this with the dynamic fields plugin. I ended up using the KeepInterfaceSimplePlugin.

Last edited 7 years ago by Ryan J Ollos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.