= 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 [http://projects.edgewall.com/trac/attachment/wiki/TimeTracking/CustomFieldsRev2827.patch 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: = 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 [report:9?COMPONENT=NewCustomFieldsPatch here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=NewCustomFieldsPatch&owner=felixcollins new ticket]. == Download == Download the zipped source from [download:newcustomfieldspatch here]. == Source == You can check out NewCustomFieldsPatch from [http://trac-hacks.org/svn/newcustomfieldspatch here] using Subversion, or [source:newcustomfieldspatch browse the source] with Trac. == Example == Examples are at the link given above too. == Recent Changes == [[ChangeLog(newcustomfieldspatch, 3)]] == Author/Contributors == '''Author:''' [wiki:felixcollins] [[BR]] '''Contributors:'''