Opened 19 years ago
Closed 18 years ago
#2752 closed enhancement (duplicate)
Custom fields per component
Reported by: | 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: |
Description
It would be great to have specific custom fields only displayed if a certain component is selected.
[ticket-custom] 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 , 19 years ago
comment:2 by , 19 years ago
Cc: | added |
---|
comment:3 by , 18 years ago
Component: | ticket system → changeset view |
---|---|
Owner: | changed from | to
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 , 18 years ago
Component: | changeset view → ticket system |
---|---|
Owner: | changed from | to
Component changed by mistake
comment:5 by , 18 years ago
Cc: | added; removed |
---|
comment:6 by , 18 years ago
Keywords: | conditional custom fields added |
---|---|
Resolution: | → duplicate |
Severity: | trivial → normal |
Status: | new → closed |
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.
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.