Custom fields

Author: System Administrator Displayed: 13644
Created: 28/08/2015 Updated: 25/09/2019
Version: 33
Tags:
MoreLess

Custom fields

The video tutorial#2
Overview
Default types of custom fields
Custom fields with formula (additional plugin required)
Corner situations

 

Overview

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.

Easy Redmine 2018 Custom fields 01.jpg

There are various formats of custom fields.

Easy Redmine 2018 Custom fields 02.jpg

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.

Image201609081254_7.png

This is how the custom field will look in the task detail.

Image201609081254_8.png

You can see the link to google maps, simply click it and it will lead you straight to google maps.

Amount

This custom field come in handy when you want to set amount of money for goods.

Image201609081254_9.png

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.

Image201609081254_10.png

Autoincrement

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.

Example scenario

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)

There are two options that can be chosen individually or together (combination):

  • Project - the numeric sequence starts with Nr. 1 for each project independently (unless the minimum number is set differently)
  • Tracker - the numeric sequence starts with Nr. 1 for each tracker independently (unless the minimum number is set differently)
  • Project & Tracker - the numeric sequence starts with the minimum number independently for each tracker and each project

Easy Redmine 2018 Custom fields 03.jpg

Boolean

This custom field (checkbox) is used to confirm or deny anything you want by using YES or NO answers.

Image201609081254_11.png

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 Image201609081254_12.png. Or radio buttons, which look like this Image201609081254_13.png. 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.

Image201609081254_14.png

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.

Date

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.

Image201609081254_15.png

Date and time

If you want to be a little more specific you can use the date and time field.

Image201609081254_16.png

E-mail

A simple text field designed for entering an e-mail address.

Image201609081254_30.jpg

File

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.

Image201609081254_31.jpg

Float

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.

Integer

Positive or negative number.

Key/value list

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.

Example scenario

Let's say you have a "list" type with the following items:

  • Value1
  • Value2

Then you assign to the particular instance Value1.

Later on, you change your list to:

  • ValueOne
  • ValueTwo

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.

Easy Redmine 2018 Custom fields 04.jpg

Link

Just insert an URL address.

List

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.

Image201609081254_17.png

This is how it looks when set, each row is a choosable value.

Image201609081254_18.png

Long Text

Resizeable multiple lines of text (supports rich text formatting as of 2.50)

Lookup

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.

Image201609081254_19.png

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.

Image201609081254_20.png

I will choose users. After that, I will choose what attribute this field will have.

Image201609081254_21.png

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.

Easy Redmine 2018 Custom fields 05.jpg

Click on the plus sign and you will be able to add a user there.

Easy Redmine 2018 Custom fields 07.jpg

Here you can see the field in the task overview after a name was selected.

Image201609081254_26.png

Milestone

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.

Easy Redmine 2018 Custom fields 08.jpg

Percent

A simple custom field with a percentage value entered by a user.

Image20171205162144_1.png

Text

Multiple lines of text (supports rich text formatting)

Image201609081254_27.png

User

This custom field allows you to select any existing user from a drop-down list or checkboxes. A custom field of the format User only works correctly on project-linked entities like Tasks, Spent time, Milestones, Documents, and Projects. When created on a different entity, no users are visible in the custom field. In such a case, use Lookup custom field instead of User custom field.

Easy Redmine 2018 Custom fields 06.jpg

Value tree

You can make multiple possible values which you can then select simultaneously. The setting is pretty simple.

Image201609081254_28.png

After filling in the values according to your liking, you will be able to choose them in the ticket by clicking the Update button.

Image201609081254_29.png

 

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.

Image201606021554_2.png

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.

Image201609121118_1.png

 

Corner situations

  • A computed custom field from a filter that is computed from a computed custom field from a filter cannot be applied (will not be processed).
Changed custom field list doesn't automatically update existing objects, How to handle estimated time (for advanced users only)
Add picture from clipboard