Edgewall Software
Modify

Opened 7 months ago

Last modified 11 days ago

#11469 new enhancement

Add a custom field admin panel

Reported by: rjollos Owned by: rjollos
Priority: normal Milestone: 1.1.3
Component: ticket system Version:
Severity: normal Keywords: custom fields
Cc: ethan.jucovy@…, olemis+trac@…, leho@…
Release Notes:
API Changes:

Description

The th:CustomFieldAdminPlugin seems to be a reasonable start for integrating a custom field admin panel to the Trac core. Here is an outline of the changes:

  • Rework the template for minor enhancements (e.g. #11027 and #11056), improved styling and to make the markup more consistent with the other ticket admin_* templates.
  • Add a CustomField class to trac.ticket.model that wraps the configuration. Later on, the storage can be changes from trac.ini to the database without changing the interface.
  • Modify the CustomFieldAdminPanel class to inherit from TicketAdminPanel and refactor.
  • Add functional test cases.

Proposed changes will be posted within the next few days.

Attachments (0)

Change History (8)

comment:1 Changed 7 months ago by ethan.jucovy@…

  • Cc ethan.jucovy@… added

comment:2 Changed 7 months ago by Olemis Lang <olemis+trac@…>

  • Cc olemis+trac@… added

comment:3 follow-up: Changed 7 weeks ago by rjollos

Work in progress in log:rjollos.git:t11469.1, but there is still a lot of work to do. It is based on the latest, r13733 of CustomFieldAdminPlugin.

The following open ticket should probably be addressed in the course of this work:

th:#11826 will be fixed implicitly by inheriting from TicketAdminPanel and th:#11855 was reported after fixing on the branch. However, hopefully th:#11855 gets committed ad it should address an issue with CustomFieldAdminPlugin that will be seen after [12512].

comment:4 in reply to: ↑ 3 ; follow-up: Changed 7 weeks ago by jomae

Replying to rjollos:

  • th:#7156 - API for defining new types of custom fields?

Previously, I've worked it in https://github.com/jun66j5/trac-customfieldadminplugin/commit/8532c814 by reference to FieldRefactoring. In the branch, it added ICustomFieldTypeProvider interface which allows to define new types.

The modified customfieldadminplugin is actually used with Trac 0.12 in our company.

comment:5 in reply to: ↑ 4 ; follow-up: Changed 7 weeks ago by psuter

Replying to jomae:

Replying to rjollos:

  • th:#7156 - API for defining new types of custom fields?

Previously, I've worked it in https://github.com/jun66j5/trac-customfieldadminplugin/commit/8532c814 by reference to FieldRefactoring. In the branch, it added ICustomFieldTypeProvider interface which allows to define new types.

Is this only for extending the admin panel or does this allow implementing the new ticket field types itself?

(When working with the new datetime fields I wondered if this was possible, but there seemed to be too many places in Trac that needed slightly different special support. I also found old discussions of a ITicketFieldTypeProvider apparently once implemented in Workflow sandbox.)

comment:6 in reply to: ↑ 5 Changed 7 weeks ago by jomae

Replying to psuter:

Replying to jomae:

Previously, I've worked it in https://github.com/jun66j5/trac-customfieldadminplugin/commit/8532c814 by reference to FieldRefactoring. In the branch, it added ICustomFieldTypeProvider interface which allows to define new types.

Is this only for extending the admin panel or does this allow implementing the new ticket field types itself?

The latter. The changes allow to add new field types. Of course, the new types can be selected in custom field admin panel.

(When working with the new datetime fields I wondered if this was possible, but there seemed to be too many places in Trac that needed slightly different special support. I also found old discussions of a ITicketFieldTypeProvider apparently once implemented in Workflow sandbox.)

Oh, thanks. I didn't notice that. I'll read the discussion later. But I cannot find the interfaces in log:sandbox/workflow@4456​. (The branch has been removed in [4457]).

comment:7 Changed 7 weeks ago by psuter

Looks like the branch was deleted once before in [3872], so from log:sandbox/workflow@3871 you can find the interface is added in [3052].

comment:8 Changed 11 days ago by lkraav <leho@…>

  • Cc leho@… added

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new The owner will remain rjollos.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from rjollos to anonymous. Next status will be 'assigned'.
Author


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

 
Note: See TracTickets for help on using tickets.