Edgewall Software
Modify

Opened 11 years ago

Last modified 2 years ago

#11469 new enhancement

Add a custom field admin panel

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: 1.7.1
Component: ticket system Version:
Severity: normal Keywords: custom fields
Cc: ethan.jucovy@…, olemis+trac@…, leho@… Branch:
Release Notes:
API Changes:
Internal 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 (28)

comment:1 by ethan.jucovy@…, 11 years ago

Cc: ethan.jucovy@… added

comment:2 by Olemis Lang <olemis+trac@…>, 11 years ago

Cc: olemis+trac@… added

comment:3 by Ryan J Ollos, 10 years ago

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].

in reply to:  3 ; comment:4 by Jun Omae, 10 years ago

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.

in reply to:  4 ; comment:5 by Peter Suter, 10 years ago

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.)

in reply to:  5 comment:6 by Jun Omae, 10 years ago

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 by Peter Suter, 10 years ago

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 by lkraav <leho@…>, 10 years ago

Cc: leho@… added

comment:9 by Ryan J Ollos, 10 years ago

Status: newassigned

comment:10 by Ryan J Ollos, 10 years ago

Milestone: 1.1.3next-dev-1.1.x
Owner: Ryan J Ollos removed
Status: assignednew

comment:11 by Ryan J Ollos, 10 years ago

Milestone: next-dev-1.1.x1.1.4

comment:12 by Ryan J Ollos, 10 years ago

Owner: set to Ryan J Ollos
Status: newassigned

comment:13 by Ryan J Ollos, 10 years ago

Milestone: 1.1.41.1.5

Narrowing focus for 1.1.4.

comment:14 by Ryan J Ollos, 10 years ago

#12217 should be investigate while preparing these changes.

comment:15 by Ryan J Ollos, 10 years ago

Milestone: 1.1.51.2

comment:16 by Ryan J Ollos, 10 years ago

Milestone: 1.21.1.6

Milestone renamed

comment:17 by Ryan J Ollos, 10 years ago

Milestone: 1.1.6next-dev-1.1.x
Owner: Ryan J Ollos removed
Status: assignednew

comment:18 by Ryan J Ollos, 9 years ago

#12264 closed as a duplicate.

comment:19 by Ryan J Ollos, 9 years ago

Milestone: next-dev-1.1.xnext-dev-1.3.x

comment:20 by Ryan J Ollos, 7 years ago

#10811 closed as a duplicate.

comment:21 by Ryan J Ollos, 7 years ago

Milestone: next-dev-1.3.x1.5.1
Owner: set to Ryan J Ollos
Status: newassigned

comment:22 by christiaan@…, 7 years ago

Please test in conjunction with th:CatagorizedFieldsPlugin

Last edited 7 years ago by Jun Omae (previous) (diff)

in reply to:  4 comment:23 by Ryan J Ollos, 5 years ago

Replying to Jun Omae:

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.

Created #13206.

comment:24 by Ryan J Ollos, 5 years ago

Milestone: 1.5.11.5.3

comment:25 by Ryan J Ollos, 4 years ago

Milestone: 1.5.31.7

comment:26 by Ryan J Ollos, 4 years ago

Milestone: 1.71.7.1

Milestone renamed

comment:27 by Ryan J Ollos, 4 years ago

Milestone: 1.7.1
Owner: Ryan J Ollos removed
Status: assignednew

comment:28 by Ryan J Ollos, 4 years ago

Milestone: 1.7.1

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.