#11882 closed defect (fixed)
CondFields not working in Trac 1.0
Reported by: | rpshaw | Owned by: | rpshaw |
---|---|---|---|
Priority: | normal | Component: | CondFieldsPlugin |
Severity: | normal | Keywords: | |
Cc: | rpshaw | Trac Release: | 1.0 |
Description
Hello,
I have just recently upgraded from 0.11.5 to 1.0, and I installed Confields 2.0 by doing the following:
- Download zip file
$ cd condfieldsplugin/0.11
- Change python to 2.7
$ python setup.py bdist_egg
- Copy egg to
plugins/
dir of trac installation - Enable in
trac.ini
and add[condfields]
section from oldtrac.ini
.
When I do this, I don't get any seeming errors in the log file, but all of the custom fields are shown for all ticket types, instead of the subset that CondFields should provide.
Is there something I did wrong, or is CondFields not supported in 1.0? Also, are there any known conflicts with other plugins (I have loaded several others, including Announcer, TracNav, XMLRPC, etc.)?
Thanks, Ryan
Attachments (1)
Change History (12)
comment:1 follow-up: 3 Changed 10 years ago by
comment:2 follow-ups: 4 5 Changed 10 years ago by
Also, take a look in the browser console for JavaScript errors on page load. You can also try disabling all of your other plugins temporarily. A conflict with another plugin would not be too surprising.
comment:3 Changed 10 years ago by
Replying to rjollos:
With the log level set to DEBUG, do you see the plugin loading when you restart Trac?
I do indeed see that in the log when the log level is set to DEBUG.
Could you post your
[condfields]
section?
Here it is:
[condfields] defect = customer,user,program,duedate,defectroot,ticketstatus,controllingagent,devteam,timeactual,versionsfixedin enhancement = customer,user,program,duedate,defectroot,ticketstatus,controllingagent,devteam,storypoints,versionsfixedin include_standard = true randarequest = ra_contact_org,ra_contactname,ra_contact_mailstop,ra_document_title,ra_contact_email,ra_contact_phone show_default = true
comment:4 Changed 10 years ago by
Replying to rjollos:
Also, take a look in the browser console for JavaScript errors on page load.
I'm not a JavaScript expert, but this error shows up in Firefox, Explorer, and Chrome:
[10:36:15.264] TypeError: re_results is null @ https://path/to/trac/condfields/view.js:117
I've attached view.js to this ticket, in case there is something that could be fixed.
You can also try disabling all of your other plugins temporarily. A conflict with another plugin would not be too surprising.
I'll also try to deactivate all other plugins to see if there is a conflict.
Changed 10 years ago by
comment:5 Changed 10 years ago by
Replying to rjollos:
You can also try disabling all of your other plugins temporarily. A conflict with another plugin would not be too surprising.
I did disable all other plugins, but the same behavior occurs - the plugin loads, but there is the afore-mentioned JavaScript error.
comment:6 Changed 10 years ago by
Hello,
I got past this with a change to the condfields.js file: Old:
if (mode == 'view') { var status_re = /\(\w+ ([^:]+)(: \w+)?\)/; var re_results = status_re.exec($('span.status').text()); set_header_type(re_results[1]); }
New:
if (mode == 'view') { set_header_type($('#field-type').val()); }
It seems to be doing the right thing, but I don't really know what it was trying to do in the old version of this. Am I doing something really bad?
comment:7 Changed 10 years ago by
Owner: | changed from anonymous to Ryan J Ollos |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In 14079:
comment:8 Changed 10 years ago by
Owner: | changed from Ryan J Ollos to rpshaw |
---|
It looks like that regex was left over from the Trac 0.10 implementation, and it just happened to work in Trac 0.11: trac:browser:/tags/trac-0.10/templates/ticket.cs@:33-38#L31. Your fix looks good.
comment:10 follow-up: 11 Changed 10 years ago by
I noticed another issue. All of the ticket fields are shown in the ticket properties table when pages does an autopreview. That is probably going to be a lot trickier to fix.
I did some quick testing in Trac 1.0 and the plugin seems to work okay.
With the log level set to DEBUG, do you see the plugin loading when you restart Trac?
Could you post your
[condfields]
section?