Edgewall Software
Modify

Opened 6 years ago

Last modified 7 weeks ago

#11469 assigned enhancement

Add a custom field admin panel

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

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

Cc: ethan.jucovy@… added

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

Cc: olemis+trac@… added

comment:3 by Ryan J Ollos, 5 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, 5 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, 5 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, 5 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, 5 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@…>, 5 years ago

Cc: leho@… added

comment:9 by Ryan J Ollos, 5 years ago

Status: newassigned

comment:10 by Ryan J Ollos, 5 years ago

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

comment:11 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.1.x1.1.4

comment:12 by Ryan J Ollos, 5 years ago

Owner: set to Ryan J Ollos
Status: newassigned

comment:13 by Ryan J Ollos, 5 years ago

Milestone: 1.1.41.1.5

Narrowing focus for 1.1.4.

comment:14 by Ryan J Ollos, 5 years ago

#12217 should be investigate while preparing these changes.

comment:15 by Ryan J Ollos, 5 years ago

Milestone: 1.1.51.2

comment:16 by Ryan J Ollos, 5 years ago

Milestone: 1.21.1.6

Milestone renamed

comment:17 by Ryan J Ollos, 4 years ago

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

comment:18 by Ryan J Ollos, 4 years ago

#12264 closed as a duplicate.

comment:19 by Ryan J Ollos, 3 years ago

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

comment:20 by Ryan J Ollos, 2 years ago

#10811 closed as a duplicate.

comment:21 by Ryan J Ollos, 2 years ago

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

comment:22 by christiaan@…, 18 months ago

Please test in conjunction with th:CatagorizedFieldsPlugin

Last edited 18 months ago by Jun Omae (previous) (diff)

in reply to:  4 comment:23 by Ryan J Ollos, 7 weeks 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Ryan J Ollos.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
to as assigned The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


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