| 172 | |
| 173 | ---- |
| 174 | |
| 175 | == Adding new custom field types == |
| 176 | |
| 177 | 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. |
| 178 | |
| 179 | '''Description of new types:''' |
| 180 | |
| 181 | ''integer'' |
| 182 | |
| 183 | Allows only integer values such as "12" and "-98329847" to be entered into the custom field. |
| 184 | |
| 185 | ''cumulative_integer'' |
| 186 | |
| 187 | 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. |
| 188 | |
| 189 | ''set_once_integer'' |
| 190 | |
| 191 | Like integer but only allows the user to set a value when the ticket is created. From then on the value is fixed. |
| 192 | |
| 193 | Syntax of ini file: |
| 194 | |
| 195 | <name> = <type> |
| 196 | |
| 197 | Example: |
| 198 | |
| 199 | {{{ [ticket-custom] |
| 200 | mycustominteger = integer |
| 201 | mycustominteger_cumulative = cumulative_integer |
| 202 | mycustominteger_setonce = set_once_integer |
| 203 | }}} |
| 204 | |
| 205 | |