1

I'm a Trac newbie, trying to add date/time fields to Trac bugs and queries. We are running Trac 0.11. I deployed both DateFieldPlugin and CustomFieldAdminPlugin plugins using easy install from the instructions on the following wiki: http://trac-hacks.org/wiki/DateFieldPlugin

DateFieldPlugin - not showing up in Plugins tab (under trac/projects/project/admin/general/plugin) CustomFieldAdminPlugin - enabled in Plugins tab (TracCustomFieldAdmin 0.2.6-r10460 under trac/projects/project/admin/general/plugin)

I have a few questions: - How do I add the custom fields using the CustomFieldAdminPlugin? - How can I get the date/time picker to show up using DateFieldPlugin (as it shows on the plugin wiki - http://trac-hacks.org/wiki/DateFieldPlugin)?

I appreciate insight on this area!

Gilad
  • 11
  • 2
  • Adding more detailed requirements/spec for the field(s) you need would help to avoid using a glass bowl to fill that gap. ;-) Will try to guide you futher, if you follow-up with more information. – hasienda Sep 07 '11 at 19:41

1 Answers1

1

At first watch out for the exact revision of your Trac source, as DateFieldPlugin as a requirement for a jQuery version newer than that in Trac 0.11.3 . If you follow the links provided on the wiki, you'll find this new version applied between Trac 0.11.4rc1 and 0.11.4rc2, so first release with an appropriate jQuery available has been 0.11.4 then.

If you start with a new project, consider running current stable - 0.12.2 these days anyway. The 0.11 releases are often still supported, but his is more and more legacy support and getting worse as Trac improves and get more powerful functions, that plugins adopt gradually.

Regarding CustomFieldAdminPlugin not showing up in the plugins list, this is serious as it is a pre-requisite, so deal with it ASAP. Especially switch to DEBUG logging and watch for hints during environment startup after tracd or webserver restart respectively.

Let's deal with other questions (custom field definition, date picker) after this has been sorted out, ok?

--

There even exists a private core dev based on effort for Trac Tickets Custom Date/Time Fields that will obsolete DateFieldPlugin except for the date-picker, that isn't in by now (but there is still a separate date picker plugin to fill that gap. This (Changeset 7377:43dbc50442fe in rblank) is a 0.13dev, but I use it in production since April this year - works great, only need some time to complete all requirements to get this into trunk development branch for Trac 0.13.

The approach has the advantage of providing native support for custom time field in TracQuery - yes, you can search with various time constraint like in time and changetime before, even added future expressions ('tomorrow', 'nextweek', ...). There even exists a preliminary patch for CustomFieldAdminPlugin. IMHO it's not much harder to just write a few lines to trac.ini, so I found myself using CustomFieldAdminPlugin only for one initial field setup and copy/adjust later on only with my favorite text editor.

hasienda
  • 2,390
  • 1
  • 13
  • 16