Table of contents
Custom fields can be managed in More: Administration: Custom fields. You can create a custom filed for every entity in the system. You can create a new custom field by clicking on "New custom field" button in the top right corner. Then the following list appears.
There are various formats of custom fields.
Some validations can be defined for each custom field:
- Group: Custom fields can be grouped for quicker navigation among them. To create a new group, enter its name into the field. To select an existing group, just start typing its name and select one from the found results.
- Min - max length: minimum and maximum length for the field (0 means that there is no restriction)
- Multiple values: while enabled, more than one item may be selected.
- Possible values: possible values for the "List" fields. One line for each value.
- Default value: default value to apply if none selected.
Default types of custom fields
Address - Google map
This field (an address with a link to google maps) is perfect for adding addresses and allows you to search google maps with only one click. After activating the field, you will have this box to fill in the address.
This is how the custom field will look in the task detail.
You can see the link to google maps, simply click it and it will lead you straight to google maps.
This custom field come in handy when you want to set amount of money for goods.
It can be used for various calculations with a calculated custom field, which we will be looking at later. This is how it looks when you are editing a task. You just fill in the number.
This is a numeric custom field with a default value (starting point) that will automatically increase by 1 for each new issue that is created until it reaches the maximum value within "from-to" range. When the maximum range is reached, the counting starts again from the beginning (from). Sequential numbers can be counted globally (one row) or within each project or tracker individually (more duplicate rows) depending on whether the respective checkboxes "sequential numbers are counted within" are ticked or not. Autoincrement value is pre-filled automatically but can be changed manually.
The scenario begins with "default value" 1, range "from-to" is set 0-999, checkboxes "sequential numbers are counted within" are not ticked.
Project 1 - autoincrement value set to 1 (automatically)
Project 2 - autoincrement value set to 2 (automatically)
Project 3 - autoincrement value set to 66 (manually)
Project 4 - autoincrement value set to 67 (automatically)
Project 5 - autoincrement value set to 5 (manually)
Project 6 - autoincrement value set to 68 (automatically), range "from-to" changed to 10-999 (manually)
Project 7 - autoincrement value set to 69 (automatically), range "from-to" changed to 90-999 (manually)
Project 8 - autoincrement value set to 90 (automatically), default value changed to 101 (manually)
Project 9 - autoincrement value set to 101 (automatically), range "from-to" changed to 0-999 and default value changed to 50 (manually)
Project 10 - autoincrement value set to 50 (automatically), default value changed to 66 (manually, the number has already been used in project 3)
Project 11 - autoincrement value set to 70 (automatically, values 67, 68, 69 have already been used in projects 4, 6, 7)
This custom field (checkbox) is used to confirm or deny anything you want by using YES or NO answers.
There are three possible ways to display boolean field. you can either have a drop down list like you can see above, only with YES or NO. Cou can a have a checkbox . Or radio buttons, which look like this . I named this custom field Boolean, but you can put anything there, for example, you want the user to confirm that he performed some kind of test, you can name it "Test performed" and he will fill in yes or no. You will then see the result in task detail.
Corner situation: When a boolean custom field is displayed as a checkbox and set as required, no action will actually be required because an empty checkbox is considered as "no" value.
This custom field has many uses. For example, you want to have Date of a contract in your task? Just add it in this field and you will have it in the task overview.
Date and time
If you want to be a little more specific you can use the date and time field.
A simple text field designed for entering an e-mail address.
A field designed for adding and removing file attachments such as images or documents. The contents of this custom field type are visible to administrators only, and other users do not have access to the contents of that field regardless of the custom field visibility setting.
The term floating point is derived from the fact that there is no fixed number of digits before and after the decimal point; that is, the decimal point can float. There are also representations in which the number of digits before and after the decimal point is set, called fixed-point representations.
Positive or negative number.
You can create your own list of values which you want your users to add. In principle, this is almost the same as "List" type except that a change in values of "List" type will not affect any existing records created in the past, while a change in values of "Key/value list" will also affect existing records created in the past.
Let's say you have a "list" type with the following items:
Then you assign to the particular instance Value1.
Later on, you change your list to:
Your particular instance will still have assigned older Value1. With "key/value list" type all the instances will change to the new value.
Corner situation: Key/value list does not support inline editing. It only works on standard task update.
Just insert an URL address.
You can create your own list of values which you want your users to add. Please note that a change in values of "List" type will not affect any existing records created in the past.
This is how it looks when set, each row is a choosable value.
Resizeable multiple lines of text (supports rich text formatting as of 2.50)
Allows you to look up in a specific entity. This field has a great functionality. You are able to lookup from a specific entity without the need to fill the entries. It takes data directly from the system. Here, for example, I created this lookup field.
I decided that I want to add a tester to the task I create. You have to choose the entity in which the system will allow you to pick, in this case, name.
I will choose users. After that, I will choose what attribute this field will have.
After saving, you will be able to fill in this field in both existing and new tasks under the projects and trackers you checked in the settings. To add a user to an existing task click on Update and >>> Click here to change additional attributes <<< You will see this.
Click on the plus sign and you will be able to add a user there.
Here you can see the field in the task overview after a name was selected.
This custom field allows you to select a milestone from a drop-down menu or tick one or more milestones as checkboxes, depending on your custom field settings. Only milestones created in the selected project are available to select.
A simple custom field with a percentage value entered by a user.
Multiple lines of text (supports rich text formatting)
This custom field allows you to select any existing user from the drop-down menu as illustrated below.
You can make multiple possible values which you can then select simultaneously. The setting is pretty simple.
After filling in the values according to your liking, you will be able to choose them in the ticket by clicking the Update button.
Custom fields with formula (additional plugin required)
Apart from the default custom fields, you can create a custom field with formula (also called computed field) for every entity in More: Administration: Custom fields. Please note that you must have purchased the plugin in your Client zone, otherwise, it's not available in the selection of custom field formats. First, choose an entity where you want the computed custom field to appear. Here I created an example custom field, where I will demonstrate, how you can use it. When creating a custom field of any kind, don't forget to set trackers and other attributes, so it will appear where you need it to appear.
Computed custom field can be used with classic math symbols, to reach your desired result. In this example, I want to see how many hour remain when an issue is 50% done and estimated time was set to 2 hours. You can calculate this by creating this equation 2*50%/100. So you find the field for estimated time*%done/100. If you don´t put /100 there, you will get a wrong result. Correctly it would be 2*0,5 but since it is not possible to divide a field itself, you can help yourself by dividing the result.
When choosing the computed field format Use the Float format. The term Float refers to the fact that a number's decimal point can "float"; that is, it can be placed anywhere relative to the significant digits of the number. When you set up the custom field like this, you have to wait around ten minutes for them to recalculate. You can speed this process up via Rake tasks where you can execute the One shot task (executes background custom actions)
Data input and data output in the formula of a computed custom field must be of the same data type (such as number or text) to be compatible. Otherwise, the computed custom field is invalid due to incompatible output for calculated values. Please review the settings of your computed custom fields for this reason. Example: text value on input cannot result in numerical value on output.
Dividing by zero?
This is a simple hack to avoid invalid outputs from computed custom fields. If you have a formula containing division and there is any chance that it may be zero, it is best to add a small value (+0,00001) to the denominator. It will be insignificant for the result and it takes care of the validity o the calculation.