Adding Item Fields

In chapter “Timeline”, you added start and end date fields to Feature. Now let’s add some more fields and also use them in views to make them more information rich.

Simple field

The simple field in Nektion is used for inputting different data (text, numbers, dates and so on) as well to do calculations. We will go through the most common simple field types.

Boolean field type

The boolean field type shows as a tick box in the UI. An example use case for this if some of our Features are mandatory, we could add a boolean field type called Mandatory. The boolean field type is added the same way as the document field type: add a simple field to the Feature and select field type Boolean. You can also add the new boolean field to for example a list view.

Numeric fields

The Integer field type is for adding integers (1, 2, …). If you want to be able to add decimals, select the Decimal field type.

Let’s add an integer field type called Story Points. The process is the same as for Boolean and Document field types – add the Story Point field to the Details view of the Story.

Formula field type

The formula field type is used for calculating different things. With the Nektion formula language you can do very diverse calculations such as calculating the time between events (e.g. status changed from “In Development” to “Done”), combining different text fields, or calculating how many tasks you have in a project.

Relation field

Relation fields are used to select and display items, such as which state an item has.

If you have created all the views that we have gone through in this tutorial, you have also created items for Feature State and Story State. If not, we will set-up a new view where you can create those items.

Let’s start with creating a relation widget to Feature. Open up a Feature and select Edit Type from the three dot menu. Right-click on the details view, select add child and then Relation Field. You can name the relation field to Feature State. Click open the relation field you created and in the Items field add the following type of formula:

NODE()<-”Feature State has Feature”:1234692

Note that the arrow goes from right to left as we want to traverse the relation from the Feature to the Feature State. If you had created the Feature States, you will now have them visible in the relation field.

A relation field can be made visually nicer by adding some colors to the options. If you right-click on a the Feature Status relation field, you can select Edit Options. With Edit Options you can arrange the order of the options, add a background color, add new options, and delete existing ones.


Picture 24: Edit Options allows you set colors, manage the order, and add and delete options

Document field type

The document field type is a field that opens a rich text editor when you click on it. This way, you can add some simple visual customization to the text contained within, making it easier to read a longer text.

Let’s add a description field to the item type Feature. To do that click open a Feature and select the Edit Type from the three dot menu. Right-click on the Details view and select “add child” to add a document field. Name the field Description and then click it open. We can now add the Description field to the list view that was created (Priorities). To do that click on the list tab and select “Edit view”. If you still have the Feature type open, you can now drag-and-drop the Description field to the View section. The Description field helps potentially a lot to prioritize our Features.

Setting default values

Sometimes you want to set a default value for a field when an item of a certain type is created. For example, in our example we might want every new Feature to have the Feature State set to New. In Nektion item creation works through a so-called template item that every item type has. When a new item of that type is created the template item is copied.

Default values are set by editing the field of the template item. Open a Feature and select Edit Type for the three dot menu. You see the item type template in the field of the same name. By pressing ctrl and clicking on the template item, it will open to the right and can edit its fields.

Picture 25: Defaults for new items are set by opening the template item and editing its fields.