Edgewall Software

Opened 16 years ago

Closed 15 years ago

#2752 closed enhancement (duplicate)

Custom fields per component

Reported by: Markus Tacker <m@…> Owned by: Jonas Borgström
Priority: lowest Milestone:
Component: ticket system Version: none
Severity: normal Keywords: conditional custom fields
Cc: hw@… Branch:
Release Notes:
API Changes:
Internal Changes:


It would be great to have specific custom fields only displayed if a certain component is selected.

installation = select
installation.label = Select the affected installation
installation.options = customerA|customerB|customerC
installation.components = Frontend|Webservice

This would mean that only if the component Frontend or Webservice is selected in the new ticket or update ticket view, the field installation would be visible.

Of course, this would require a reload of the ticket form if the value of the component field is changed.

Attachments (0)

Change History (6)

comment:1 by Alec Thomas, 16 years ago

This is possible using a custom !ITicketManipulator in the WorkFlow sandbox. filter_fields() would hide the appropriate field based on the available components.

The dynamic updating is not yet possible but I hope to have custom field types available soon, which would allow this. I'm not quite sure how to achieve this though, as ideally the ticket edit/view HTML would be a ClearSilver template. Because the template needs to be injected in arbitrary locations, the only real way I can think of accomplishing this is to set an element in the HDF to the rendered template output.

comment:2 by anonymous, 16 years ago

Cc: shishz@… added

comment:3 by anonymous, 15 years ago

Component: ticket systemchangeset view
Owner: changed from Jonas Borgström to Christian Boos

It would be great if this was possible to do with the Version number as well. We currently use trac to manage several products and each has its own version numbers, so you should not be able to register a ticket on product A with version number B1.

comment:4 by anonymous, 15 years ago

Component: changeset viewticket system
Owner: changed from Christian Boos to Jonas Borgström

Component changed by mistake

comment:5 by anonymous, 15 years ago

Cc: hw@… added; shishz@… removed

comment:6 by Christian Boos, 15 years ago

Keywords: conditional custom fields added
Resolution: duplicate
Severity: trivialnormal
Status: newclosed

Like for the example given in the description above, there could be situations where data could be conditionally associated to tickets.

Non-applicable fields would simply not be stored (see #4447), and to reduce the clutter in the ticket interface, the conditional fields could be hidden/shown using Javascript.

When the fields cease to be applicable (e.g. in the example, Component changes from Frontend to Backend), the value should be cleared as well.

We'd need a more generic way to specify the constraints, though, so that this could apply to other fields (like type). Actually, I'll close this as duplicate of #2464, and I'll broaden the scope of the latter.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.