Add New Custom Field Types
Description
It is useful to have fields that only accept numbers, fields that only accept an entry when the ticket is created and perhaps a field that accumulates the numbers you enter? This can be achieved with a patch to the appropriate .cs files and the addition of a little javascript. The changes can be found in the patch file attached.
Description of new types:
integer
Allows only integer values such as "12" and "-98329847" to be entered into the custom field.
cumulative_integer
Like integer but only allows the user to enter a value that is added to the current value. Useful for accumulating work done on a ticket or dollars spent.
set_once_integer
Like integer but only allows the user to set a value when the ticket is created. From then on the value is fixed.
Syntax of ini file:
<name> = <type>
Example:
[ticket-custom] mycustominteger = integer mycustominteger_cumulative = cumulative_integer mycustominteger_setonce = set_once_integer
Bugs/Feature Requests
Existing bugs and feature requests for NewCustomFieldsPatch are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from here.
Source
You can check out NewCustomFieldsPatch from here using Subversion, or browse the source with Trac.
Example
Examples are at the link given above too.
Recent Changes
[569] by felixcollins on 03/28/06 15:19:04
New hack NewCustomFieldsPatch, created by felixcollins
Author/Contributors
Author: felixcollins
Contributors: